Laravel 8 自定义 Cookie 名称
2021-07-26 09:54 更新
如果需要,你可以在 AuthServiceProvider 的 boot 方法中使用 Passport::cookie 方法来自定义 laravel_token cookie 的名称。
/**
* 注册认证 / 授权服务
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
Passport::routes();
Passport::cookie('custom_name');
} 以上内容是否对您有帮助:

免费 AI IDE


更多建议: