composer require topthink/think-throttle
在应用route目录下的app.php内
use think\middleware\Throttle;
示例:
Route::group(function (){
Route:resourece(‘goods’,”Goods”);
})->middleware(Throttle::class,[‘visit_rate’=>’3/m’,]);
composer require topthink/think-throttle
在应用route目录下的app.php内
use think\middleware\Throttle;
示例:
Route::group(function (){
Route:resourece(‘goods’,”Goods”);
})->middleware(Throttle::class,[‘visit_rate’=>’3/m’,]);