public function registerStorageBindings(Application $app)
    {
        $provider = $this;

        $app->singleton(FluentAccessToken::class, function () use ($provider) {
            $storage = new FluentAccessToken($provider->app['db']);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentAuthCode::class, function () use ($provider) {
            $storage = new FluentAuthCode($provider->app['db']);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentClient::class, function ($app) use ($provider) {
            $limitClientsToGrants = $app['config']->get('oauth2.limit_clients_to_grants');
            $storage = new FluentClient($provider->app['db'], $limitClientsToGrants);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentRefreshToken::class, function () use ($provider) {
            $storage = new FluentRefreshToken($provider->app['db']);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentScope::class, function ($app) use ($provider) {
            $limitClientsToScopes = $app['config']->get('oauth2.limit_clients_to_scopes');
            $limitScopesToGrants = $app['config']->get('oauth2.limit_scopes_to_grants');
            $storage = new FluentScope($provider->app['db'], $limitClientsToScopes, $limitScopesToGrants);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentSession::class, function () use ($provider) {
            $storage = new FluentSession($provider->app['db']);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });
    }
public function registerStorageBindings(Application $app)
    {
        $provider = $this;

        $app->singleton(FluentAccessToken::class, function () use ($provider) {
            $storage = new FluentAccessToken($provider->app['db']);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentAuthCode::class, function () use ($provider) {
            $storage = new FluentAuthCode($provider->app['db']);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentClient::class, function ($app) use ($provider) {
            $limitClientsToGrants = $app['config']->get('oauth2.limit_clients_to_grants');
            $storage = new FluentClient($provider->app['db'], $limitClientsToGrants);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentRefreshToken::class, function () use ($provider) {
            $storage = new FluentRefreshToken($provider->app['db']);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentScope::class, function ($app) use ($provider) {
            $limitClientsToScopes = $app['config']->get('oauth2.limit_clients_to_scopes');
            $limitScopesToGrants = $app['config']->get('oauth2.limit_scopes_to_grants');
            $storage = new FluentScope($provider->app['db'], $limitClientsToScopes, $limitScopesToGrants);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });

        $app->singleton(FluentSession::class, function () use ($provider) {
            $storage = new FluentSession($provider->app['db']);
            $storage->setConnectionName($provider->getConnectionName());

            return $storage;
        });
    }
public function registerStorageBindings ( Application $ app ) { $ provider = $ this ; $ app -> singleton ( FluentAccessToken :: class , function ( ) use ( $ provider ) { $ storage = new FluentAccessToken ( $ provider -> app [ 'db' ] ) ; $ storage -> setConnectionName ( $ provider -> getConnectionName ( ) ) ; return $ storage ; } ) ; $ app -> singleton ( FluentAuthCode :: class , function ( ) use ( $ provider ) { $ storage = new FluentAuthCode ( $ provider -> app [ 'db' ] ) ; $ storage -> setConnectionName ( $ provider -> getConnectionName ( ) ) ; return $ storage ; } ) ; $ app -> singleton ( FluentClient :: class , function ( $ app ) use ( $ provider ) { $ limitClientsToGrants = $ app [ 'config' ] -> get ( 'oauth2.limit_clients_to_grants' ) ; $ storage = new FluentClient ( $ provider -> app [ 'db' ] , $ limitClientsToGrants ) ; $ storage -> setConnectionName ( $ provider -> getConnectionName ( ) ) ; return $ storage ; } ) ; $ app -> singleton ( FluentRefreshToken :: class , function ( ) use ( $ provider ) { $ storage = new FluentRefreshToken ( $ provider -> app [ 'db' ] ) ; $ storage -> setConnectionName ( $ provider -> getConnectionName ( ) ) ; return $ storage ; } ) ; $ app -> singleton ( FluentScope :: class , function ( $ app ) use ( $ provider ) { $ limitClientsToScopes = $ app [ 'config' ] -> get ( 'oauth2.limit_clients_to_scopes' ) ; $ limitScopesToGrants = $ app [ 'config' ] -> get ( 'oauth2.limit_scopes_to_grants' ) ; $ storage = new FluentScope ( $ provider -> app [ 'db' ] , $ limitClientsToScopes , $ limitScopesToGrants ) ; $ storage -> setConnectionName ( $ provider -> getConnectionName ( ) ) ; return $ storage ; } ) ; $ app -> singleton ( FluentSession :: class , function ( ) use ( $ provider ) { $ storage = new FluentSession ( $ provider -> app [ 'db' ] ) ; $ storage -> setConnectionName ( $ provider -> getConnectionName ( ) ) ; return $ storage ; } ) ; }
Bind the storage implementations to the IoC container.

@param \Illuminate\Contracts\Foundation\Application $app

@return void
Bind the storage implementations to the IoC container .