1 | <?php |
||
2 | |||
3 | namespace Napp\Core\Api\Auth; |
||
4 | |||
5 | use Illuminate\Support\Facades\Auth; |
||
6 | use Illuminate\Support\ServiceProvider; |
||
7 | |||
8 | /** |
||
9 | * Class AuthServiceProvider. |
||
10 | */ |
||
11 | class AuthServiceProvider extends ServiceProvider |
||
12 | { |
||
13 | /** |
||
14 | * @return void |
||
15 | */ |
||
16 | public function register() |
||
17 | { |
||
18 | Auth::extend('api', function ($app, $name, array $config) { |
||
19 | return new ApiGuard(Auth::createUserProvider($config['provider']), $app['request']); |
||
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
20 | }); |
||
21 | } |
||
22 | } |
||
23 |