在Laravel的默认VerificationController.php
的construct
方法中,我看到:
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
$this->middleware('signed')->only('verify');
$this->middleware('throttle:6,1')->only('verify', 'resend');
}
这三个中间件是做什么的?
- auth-middlware确保用户已登录
- singned与URL签名有关,这意味着将加密数据作为查询参数更多地附加在:https://laravel.com/docs/8.x/urls#signed-url
- 油门6.1意味着你每分钟不能提出超过6个请求
仅表示它仅适用于选定的控制器方法