Cartalyst\Sentinel\Laravel\SentinelServiceProvider::registerCheckpoints PHP Method

registerCheckpoints() protected method

Registers the checkpoints.
protected registerCheckpoints ( ) : void
return void
    protected function registerCheckpoints()
    {
        $this->registerActivationCheckpoint();
        $this->registerThrottleCheckpoint();
        $this->app->singleton('sentinel.checkpoints', function ($app) {
            $activeCheckpoints = $app['config']->get('cartalyst.sentinel.checkpoints');
            $checkpoints = [];
            foreach ($activeCheckpoints as $checkpoint) {
                if (!$app->offsetExists("sentinel.checkpoint.{$checkpoint}")) {
                    throw new InvalidArgumentException("Invalid checkpoint [{$checkpoint}] given.");
                }
                $checkpoints[$checkpoint] = $app["sentinel.checkpoint.{$checkpoint}"];
            }
            return $checkpoints;
        });
    }