/**
  * @inheritdoc
  */
 public function register()
 {
     parent::register();
     $this->app->singleton(Repository::class);
     $this->app->singleton(Manager::class);
     AliasLoader::getInstance(['Settings' => SettingsFacade::class]);
 }
示例#2
0
 /**
  * Register the service provider.
  *
  * @return void
  */
 public function register()
 {
     parent::register();
     $this->app->singleton(Backend::class, function () {
         return new Backend($this->app);
     });
     $this->commands(MakeConfigCommand::class);
     // Register the middleware with the container using the container's singleton method.
     $this->app->singleton(StartSession::class);
     $this->app->make('router')->middlewareGroup('backend', [SetBackendGuard::class, EncryptCookies::class, AddQueuedCookiesToResponse::class, StartSession::class, ShareErrorsFromSession::class, VerifyCsrfToken::class]);
     $this->app->make('router')->middleware('backend.auth', Authenticate::class);
     $this->app->make('router')->middleware('backend.auth.base', AuthenticateWithBasicAuth::class);
     AliasLoader::getInstance(['Backend' => BackendFacade::class]);
 }