Laravel 8 指定看守器
当你把 auth 中间件添加到路由中时,同时也能指定使用哪个看守器进行用户认证。指定的看守器应该对应 auth.php 配置文件中 guards 数组中的的一个键:
public function __construct()
{
$this->middleware('auth:api');
}
当你把 auth 中间件添加到路由中时,同时也能指定使用哪个看守器进行用户认证。指定的看守器应该对应 auth.php 配置文件中 guards 数组中的的一个键:
public function __construct()
{
$this->middleware('auth:api');
}