📜  油门 laravel - PHP 代码示例

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

代码示例2
//In Laravel we use throttle middleware to restrict the amount of traffic 
//for a given route or group of routes. The throttle middleware accepts two parameters 
//that determine the maximum number of requests that can be made in a given number of minutes. 
//For example: 
//Here 60 is number of requests you can make in 1 minute.
  
Route::middleware('throttle:60,1')->get('/user', function () { 
  //
});