Answers for "limiting requests to controllers in laravel"

PHP
1

limiting requests to controllers in laravel

//Controller add

public function __construct()
	{
		$this->middleware([
			'auth',
//About 20 requests per minute to Cotroller and error if there are too many requests
			'throttle:20,1'
        ]);
	}
Posted by: Guest on July-28-2021

Browse Popular Code Answers by Language