original_string: private function registerRoutesAndMiddlewares()
      {
          /**
           * @var Router $router
           */
          $router = $this->app[ 'router' ];
  
          $router->middlewareGroup( 'admin', [
              \App\Http\Middleware\EncryptCookies::class,
              \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
              \Illuminate\Session\Middleware\StartSession::class,
              \Illuminate\View\Middleware\ShareErrorsFromSession::class,
              \App\Http\Middleware\VerifyCsrfToken::class,
              \Illuminate\Routing\Middleware\SubstituteBindings::class,
              ArboryAdminHasAllowedIpMiddleware::class
          ] );
  
          $router->aliasMiddleware( 'arbory.admin_auth', ArboryAdminAuthMiddleware::class );
          $router->aliasMiddleware( 'arbory.admin_module_access', ArboryAdminModuleAccessMiddleware::class );
          $router->aliasMiddleware( 'arbory.admin_quest', ArboryAdminGuestMiddleware::class );
          $router->aliasMiddleware( 'arbory.admin_in_role', ArboryAdminInRoleMiddleware::class );
          $router->aliasMiddleware( 'arbory.admin_has_access', ArboryAdminHasAccessMiddleware::class );
          $router->aliasMiddleware( 'arbory.route_redirect', ArboryRouteRedirectMiddleware::class );
          $router->aliasMiddleware( 'arbory.admin_has_allowed_ip', ArboryAdminHasAllowedIpMiddleware::class );
  
          $this->app->booted( function( $app )
          {
              $app[ Kernel::class ]->prependMiddleware( ArboryRouteRedirectMiddleware::class );
          } );
  
          $this->registerAdminRoutes();
          $this->registerAppRoutes();
      }
code: private function registerRoutesAndMiddlewares()
      {
          /**
           * @var Router $router
           */
          $router = $this->app[ 'router' ];
  
          $router->middlewareGroup( 'admin', [
              \App\Http\Middleware\EncryptCookies::class,
              \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
              \Illuminate\Session\Middleware\StartSession::class,
              \Illuminate\View\Middleware\ShareErrorsFromSession::class,
              \App\Http\Middleware\VerifyCsrfToken::class,
              \Illuminate\Routing\Middleware\SubstituteBindings::class,
              ArboryAdminHasAllowedIpMiddleware::class
          ] );
  
          $router->aliasMiddleware( 'arbory.admin_auth', ArboryAdminAuthMiddleware::class );
          $router->aliasMiddleware( 'arbory.admin_module_access', ArboryAdminModuleAccessMiddleware::class );
          $router->aliasMiddleware( 'arbory.admin_quest', ArboryAdminGuestMiddleware::class );
          $router->aliasMiddleware( 'arbory.admin_in_role', ArboryAdminInRoleMiddleware::class );
          $router->aliasMiddleware( 'arbory.admin_has_access', ArboryAdminHasAccessMiddleware::class );
          $router->aliasMiddleware( 'arbory.route_redirect', ArboryRouteRedirectMiddleware::class );
          $router->aliasMiddleware( 'arbory.admin_has_allowed_ip', ArboryAdminHasAllowedIpMiddleware::class );
  
          $this->app->booted( function( $app )
          {
              $app[ Kernel::class ]->prependMiddleware( ArboryRouteRedirectMiddleware::class );
          } );
  
          $this->registerAdminRoutes();
          $this->registerAppRoutes();
      }
code_tokens: private function registerRoutesAndMiddlewares ( ) { /**
           * @var Router $router
           */ $ router = $ this -> app [ 'router' ] ; $ router -> middlewareGroup ( 'admin' , [ \ App \ Http \ Middleware \ EncryptCookies :: class , \ Illuminate \ Cookie \ Middleware \ AddQueuedCookiesToResponse :: class , \ Illuminate \ Session \ Middleware \ StartSession :: class , \ Illuminate \ View \ Middleware \ ShareErrorsFromSession :: class , \ App \ Http \ Middleware \ VerifyCsrfToken :: class , \ Illuminate \ Routing \ Middleware \ SubstituteBindings :: class , ArboryAdminHasAllowedIpMiddleware :: class ] ) ; $ router -> aliasMiddleware ( 'arbory.admin_auth' , ArboryAdminAuthMiddleware :: class ) ; $ router -> aliasMiddleware ( 'arbory.admin_module_access' , ArboryAdminModuleAccessMiddleware :: class ) ; $ router -> aliasMiddleware ( 'arbory.admin_quest' , ArboryAdminGuestMiddleware :: class ) ; $ router -> aliasMiddleware ( 'arbory.admin_in_role' , ArboryAdminInRoleMiddleware :: class ) ; $ router -> aliasMiddleware ( 'arbory.admin_has_access' , ArboryAdminHasAccessMiddleware :: class ) ; $ router -> aliasMiddleware ( 'arbory.route_redirect' , ArboryRouteRedirectMiddleware :: class ) ; $ router -> aliasMiddleware ( 'arbory.admin_has_allowed_ip' , ArboryAdminHasAllowedIpMiddleware :: class ) ; $ this -> app -> booted ( function ( $ app ) { $ app [ Kernel :: class ] -> prependMiddleware ( ArboryRouteRedirectMiddleware :: class ) ; } ) ; $ this -> registerAdminRoutes ( ) ; $ this -> registerAppRoutes ( ) ; }
docstring: Load admin routes and register middleware
docstring_tokens: Load admin routes and register middleware