src/PassportServiceProvider.php
protected function makeGuard(array $config)
    {
        return new RequestGuard(function ($request) use ($config) {
            return (new TokenGuard(
                $this->app->make(ResourceServer::class),
                Auth::createUserProvider($config['provider']),
                $this->app->make(TokenRepository::class),
                $this->app->make(ClientRepository::class),
                $this->app->make('encrypter')
            ))->user($request);
        }, $this->app['request']);
    }
protected function makeGuard(array $config)
    {
        return new RequestGuard(function ($request) use ($config) {
            return (new TokenGuard(
                $this->app->make(ResourceServer::class),
                Auth::createUserProvider($config['provider']),
                $this->app->make(TokenRepository::class),
                $this->app->make(ClientRepository::class),
                $this->app->make('encrypter')
            ))->user($request);
        }, $this->app['request']);
    }
protected function makeGuard ( array $ config ) { return new RequestGuard ( function ( $ request ) use ( $ config ) { return ( new TokenGuard ( $ this -> app -> make ( ResourceServer :: class ) , Auth :: createUserProvider ( $ config [ 'provider' ] ) , $ this -> app -> make ( TokenRepository :: class ) , $ this -> app -> make ( ClientRepository :: class ) , $ this -> app -> make ( 'encrypter' ) ) ) -> user ( $ request ) ; } , $ this -> app [ 'request' ] ) ; }
Make an instance of the token guard.

@param  array  $config
@return \Illuminate\Auth\RequestGuard
Make an instance of the token guard .