protected function registerSentinel()
    {
        $this->app->singleton('sentinel', function ($app) {
            // @codeCoverageIgnoreStart
            $sentinel = new Sentinel(
                $app['sentinel.persistence'],
                $app['sentinel.users'],
                $app['sentinel.roles'],
                $app['sentinel.activations'],
                $app['events']
            );

            if (isset($app['sentinel.checkpoints'])) {
                foreach ($app['sentinel.checkpoints'] as $key => $checkpoint) {
                    $sentinel->addCheckpoint($key, $checkpoint);
                }
            }

            $sentinel->setActivationRepository($app['sentinel.activations']);
            $sentinel->setReminderRepository($app['sentinel.reminders']);

            $sentinel->setRequestCredentials(function () use ($app) {
                $request = $app['request'];

                $login    = $request->getUser();
                $password = $request->getPassword();

                if ($login === null && $password === null) {
                    return null;
                }

                return compact('login', 'password');
            });

            $sentinel->creatingBasicResponse(function () {
                $headers = ['WWW-Authenticate' => 'Basic'];

                return response('Invalid credentials.', 401, $headers);
            });

            return $sentinel;
            // @codeCoverageIgnoreEnd
        });

        // no alias
    }
protected function registerSentinel()
    {
        $this->app->singleton('sentinel', function ($app) {
            // @codeCoverageIgnoreStart
            $sentinel = new Sentinel(
                $app['sentinel.persistence'],
                $app['sentinel.users'],
                $app['sentinel.roles'],
                $app['sentinel.activations'],
                $app['events']
            );

            if (isset($app['sentinel.checkpoints'])) {
                foreach ($app['sentinel.checkpoints'] as $key => $checkpoint) {
                    $sentinel->addCheckpoint($key, $checkpoint);
                }
            }

            $sentinel->setActivationRepository($app['sentinel.activations']);
            $sentinel->setReminderRepository($app['sentinel.reminders']);

            $sentinel->setRequestCredentials(function () use ($app) {
                $request = $app['request'];

                $login    = $request->getUser();
                $password = $request->getPassword();

                if ($login === null && $password === null) {
                    return null;
                }

                return compact('login', 'password');
            });

            $sentinel->creatingBasicResponse(function () {
                $headers = ['WWW-Authenticate' => 'Basic'];

                return response('Invalid credentials.', 401, $headers);
            });

            return $sentinel;
            // @codeCoverageIgnoreEnd
        });

        // no alias
    }
protected function registerSentinel ( ) { $ this -> app -> singleton ( 'sentinel' , function ( $ app ) { // @codeCoverageIgnoreStart $ sentinel = new Sentinel ( $ app [ 'sentinel.persistence' ] , $ app [ 'sentinel.users' ] , $ app [ 'sentinel.roles' ] , $ app [ 'sentinel.activations' ] , $ app [ 'events' ] ) ; if ( isset ( $ app [ 'sentinel.checkpoints' ] ) ) { foreach ( $ app [ 'sentinel.checkpoints' ] as $ key => $ checkpoint ) { $ sentinel -> addCheckpoint ( $ key , $ checkpoint ) ; } } $ sentinel -> setActivationRepository ( $ app [ 'sentinel.activations' ] ) ; $ sentinel -> setReminderRepository ( $ app [ 'sentinel.reminders' ] ) ; $ sentinel -> setRequestCredentials ( function ( ) use ( $ app ) { $ request = $ app [ 'request' ] ; $ login = $ request -> getUser ( ) ; $ password = $ request -> getPassword ( ) ; if ( $ login === null && $ password === null ) { return null ; } return compact ( 'login' , 'password' ) ; } ) ; $ sentinel -> creatingBasicResponse ( function ( ) { $ headers = [ 'WWW-Authenticate' => 'Basic' ] ; return response ( 'Invalid credentials.' , 401 , $ headers ) ; } ) ; return $ sentinel ; // @codeCoverageIgnoreEnd } ) ; // no alias }
Overrides parent so as not to use the alias.

{@inheritdoc}
Overrides parent so as not to use the alias .