阅读(531)
赞(2)
Laravel 8 自定义 Cookie 名称
2021-07-09 12:59:55 更新
如果需要,你可以在 AuthServiceProvider 的 boot 方法中使用 Passport::cookie 方法来自定义 laravel_token cookie 的名称。
/**
* 注册认证 / 授权服务
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
Passport::routes();
Passport::cookie('custom_name');
} 
