📜  在 laravel 中限制对控制器的请求 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:43.181000             🧑  作者: Mango

代码示例1
//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'
        ]);
    }