我是api authentication (护照)的新手。是否可以使用
$this->middleware('auth:api');即使使用在认证(php artisan make:auth)中内置的laravel
发布于 2018-09-26 09:11:51
您可以使用auth:api保护api,只需在config/auth.php中将api保护驱动程序更改为护照即可。
'guards' => [
'web' => [
'driver' => 'session',
'provider' => 'users',
],
'api' => [
//'driver' => 'token',
'driver' => 'passport',
'provider' => 'users',
],
],https://stackoverflow.com/questions/52511906
复制相似问题