laravel - 自定义Guard
#[https://www.cnblogs.com/shanhubei/p/17792681.html]
1. auth.php新建guards, 绑定providers
2. user模型实现
3. 设置Guard定义校验
4. AuthServiceProvider.php服务绑定
// add custom guard Auth::extend('json', function ($app, $name, array $config) { return new JsonGuard(Auth::createUserProvider($config['provider']), $app->make('request')); });