Map administrator authentication routes.

@param \Illuminate\Routing\Router $router
779196
protected function mapAdministratorAuthenticationRoutes(Router $router)
    {
        $router->group(['prefix' => admin_prefix(), 'middleware' => 'web'], function () use ($router) {
            $router->get('login', AuthController::class . '@showLoginForm')->name('administrator.login');
            $router->get('logout', AuthController::class . '@logout')->name('administrator.logout');
            $router->post('login', AuthController::class . '@login')->name('administrator.login');
        });
    }
982145
public function boot(\Illuminate\Routing\Router $router)
    {
        $this->publishes([
            __DIR__ . '/../publish/Middleware/' => app_path('Http/Middleware'),
        ]);

        $this->publishes([
            __DIR__ . '/../publish/migrations/' => database_path('migrations'),
        ]);

        $this->publishes([
            __DIR__ . '/../publish/Model/' => app_path(),
        ]);

        $this->publishes([
            __DIR__ . '/../publish/Controllers/' => app_path('Http/Controllers'),
        ]);

        $this->publishes([
            __DIR__ . '/../publish/resources/' => base_path('resources'),
        ]);

        $this->publishes([
            __DIR__ . '/../publish/crudgenerator.php' => config_path('crudgenerator.php'),
        ]);

        $this->publishes([
            __DIR__ . '/views' => base_path('resources/views/vendor/laravel-admin'),
        ], 'views');

        $this->loadViewsFrom(__DIR__ . '/views', 'laravel-admin');

        $menus = [];
        if (File::exists(base_path('resources/laravel-admin/menus.json'))) {
            $menus = json_decode(File::get(base_path('resources/laravel-admin/menus.json')));
            view()->share('laravelAdminMenus', $menus);
        }
    }
623142
public function add_middleware($router)
    {

        // Authenticate checks that the session is
        // simply authenticated
        $router->aliasMiddleware('auth', Authenticate::class);

        // Ensure that all of the SeAT required modules is installed.
        $router->aliasMiddleware('requirements', Requirements::class);

        // Localization support
        $router->aliasMiddleware('locale', Locale::class);

        // Registration Middleware checks of the app is
        // allowing new user registration to occur.
        $router->aliasMiddleware('registration.status', RegistrationAllowed::class);

        // The Bouncer is responsible for checking hes
        // AccessChecker and ensuring that every request
        // that comes in is authorized
        $router->aliasMiddleware('bouncer', Bouncer::class);
        $router->aliasMiddleware('characterbouncer', CharacterBouncer::class);
        $router->aliasMiddleware('corporationbouncer', CorporationBouncer::class);
        $router->aliasMiddleware('keybouncer', KeyBouncer::class);

    }
830586
public function registerMiddleware(Router $router)
    {
        foreach ($this->middleware as $module => $middlewares) {
            foreach ($middlewares as $name => $middleware) {
                $class = "Modules\\{$module}\\Http\\Middleware\\{$middleware}";

                $router->middleware($name, $class);
            }
        }
    }
1199021
public function map(Router $router)
    {
        $router->group([ 'prefix' => config('docit.base_route'), 'namespace' => $this->namespace ], function ($router)
        {

            require(realpath(__DIR__ . '/../Http/routes.php'));
        });
    }
123147
public function boot(Router $router)
    {
        $this->loadViewsFrom(__DIR__ . '/views', 'initialize');

        $this->publishes([
            __DIR__.'/config/wangeditor.php' => config_path('wangeditor.php'),
        ], 'config');

        $this->publishes([
            __DIR__ . '/assets/wangeditor' => public_path('vendor/wangeditor'),
        ], 'assets');

        $this->publishes([
            __DIR__ . '/views' => base_path('resources/views/vendor/wangeditor')
        ], 'resources');

        if (!app()->runningInConsole()) {
            $this->registerRoute($router);
        }
    }
171818
protected function mapOtherwise(Router $router, $routes, $applyAlwaysAuthenticate)
    {
        $middleware = [
            SubstituteBindings::class,
            Acceptable::class,
            Timezone::class,
        ];

        if ($applyAlwaysAuthenticate && !$this->isWhiteListedAuthRoute($routes)) {
            $middleware[] = 'auth.api:true';
        }

        $router->group(['middleware' => $middleware], function (Router $router) use ($routes) {
            $routes->map($router);
        });
    }
252417
public function boot(Router $router)
    {
        $this->publishes([
            __DIR__ . '/Config/signed-url.php' => config_path('signed-url.php')
        ], 'signed-url');

        $this->app->singleton('signed-url', function () {
            return new SignedUrl();
        });

        $router->aliasMiddleware('signed-url', config('signed-url.middleware'));

        $this->app->alias(SignedUrl::class, 'signed-url');
    }
925936
public function map(Router $router)
    {
        $this->app['events']->fire('routes.loading');

        foreach ($this->app['modules.loader']->getRegisteredModules() as $module) {
            $this->app->call([$module, 'loadRoutes'], [$router]);
        }

        $this->app['events']->fire('routes.loaded');
    }
998299
public function map(Router $router)
    {
        $router->group(['namespace' => $this->namespace], function (Router $router) {

            /*
             * Admin routes
             */
            $router->get('admin/groups', ['as' => 'admin.groups.index', 'uses' => 'AdminController@index']);
            $router->get('admin/groups/create', ['as' => 'admin.groups.create', 'uses' => 'AdminController@create']);
            $router->get('admin/groups/{group}/edit', ['as' => 'admin.groups.edit', 'uses' => 'AdminController@edit']);
            $router->post('admin/groups', ['as' => 'admin.groups.store', 'uses' => 'AdminController@store']);
            $router->put('admin/groups/{group}', ['as' => 'admin.groups.update', 'uses' => 'AdminController@update']);

            /*
             * API routes
             */
            $router->get('api/groups', ['as' => 'api.groups.index', 'uses' => 'ApiController@index']);
            $router->put('api/groups/{group}', ['as' => 'api.groups.update', 'uses' => 'ApiController@update']);
            $router->delete('api/groups/{group}', ['as' => 'api.groups.destroy', 'uses' => 'ApiController@destroy']);
        });
    }
143766
public function boot(Router $router)
    {
        // Tell Laravel where the views for a given namespace are located.
        $this->loadViewsFrom(base_path('vendor/aginev/acl/src/resources/views'), 'acl');

        $this->publishes([
            base_path('vendor/aginev/acl/src/resources/views') => base_path('resources/views/vendor/acl'),
        ], 'views');

        // Publish assets
        $this->publishes([
            base_path('vendor/aginev/acl/src/public') => public_path('vendor/acl'),
        ], 'public');

        // Tell Laravel where the translations for a given namespace are located.
        $this->loadTranslationsFrom(base_path('vendor/aginev/acl/src/resources/lang'), 'acl');

        $this->publishes([
            base_path('vendor/aginev/acl/src/resources/lang') => base_path('resources/lang/vendor/acl'),
        ], 'lang');

        // Merge config
        $this->mergeConfigFrom(base_path('vendor/aginev/acl/src/config/acl.php'), 'acl');

        $this->publishes([
            base_path('vendor/aginev/acl/src/config/acl.php') => config_path('acl.php'),
        ], 'config');

        // Publish migrations
        $this->publishes([
            base_path('vendor/aginev/acl/src/Database/Migrations/') => base_path('/database/migrations')
        ], 'migrations');

        // Publish seeds
        $this->publishes([
            base_path('vendor/aginev/acl/src/Database/Seeds/') => base_path('/database/seeds')
        ], 'seeds');

        // Define the ACL route middleware
        $router->middleware('acl', 'Aginev\Acl\Http\Middleware\Acl');

        /**
         * Including A Routes File From A Service Provider
         * NB! Keep this line at the very end of the method to be able to use the config at routes.php
         */
        include base_path('vendor/aginev/acl/src/Http/routes.php');
    }
1264433
public function boot(\Illuminate\Routing\Router $router)
    {
        if (! $this->app->routesAreCached()) {
            require __DIR__.'/Routes/web.php';
        }

        $this->publishes([
            __DIR__.'/Config/links.php' => config_path('links.php'),
        ], 'links_config');

        $router->aliasMiddleware('links.middleware', config('links.middleware'));

        $this->app->register(IdentifyServiceProvider::class);
        $this->app->register(ChartsServiceProvider::class);

        $this->loadViewsFrom(__DIR__.'/Views', 'links');

        $this->loadMigrationsFrom(__DIR__.'/Migrations');
    }
35865
public function mapWebRoutes(Router $router)
    {
        $permissionPrefix = $this->routeHelper->getPermissionPrefixForModelSlug(
            $this->getModelSlug()
        );

        $router->group(
            [
                'prefix'    => $this->getRoutePrefix(),
                'as'        => $this->getRouteNamePrefix(),
                'middleware' => [ cms_mw_permission("{$permissionPrefix}*") ],
            ],
            function (Router $router) use ($permissionPrefix) {

                $controller = $this->getModelWebController();

                $router->get('/', [
                    'as'   => 'index',
                    'uses' => $controller . '@index',
                ]);

                $router->get('create', [
                    'as'         => 'create',
                    'middleware' => [cms_mw_permission("{$permissionPrefix}create")],
                    'uses'       => $controller . '@create',
                ]);

                $router->post('/', [
                    'as'         => 'store',
                    'middleware' => [
                        cms_mw_permission("{$permissionPrefix}create"),
                        StoreActiveFormContext::class,
                    ],
                    'uses'       => $controller . '@store',
                ]);

                $router->post('filter', [
                    'as'   => 'filter',
                    'uses' => $controller . '@filter',
                ]);

                $router->get('export/{strategy}', [
                    'as'         => 'export',
                    'middleware' => [cms_mw_permission("{$permissionPrefix}export")],
                    'uses'       => $controller . '@export',
                ]);

                $router->get('{key}', [
                    'as'   => 'show',
                    'uses' => $controller . '@show',
                ]);

                $router->get('{key}/edit', [
                    'as'         => 'edit',
                    'middleware' => [cms_mw_permission("{$permissionPrefix}edit")],
                    'uses'       => $controller . '@edit',
                ]);

                $router->put('{key}/activate', [
                    'as'         => 'activate',
                    'middleware' => [cms_mw_permission("{$permissionPrefix}edit")],
                    'uses'       => $controller . '@activate',
                ]);

                $router->put('{key}/position', [
                    'as'         => 'position',
                    'middleware' => [cms_mw_permission("{$permissionPrefix}edit")],
                    'uses'       => $controller . '@position',
                ]);

                $router->get('{key}/deletable', [
                    'as'         => 'deletable',
                    'middleware' => [cms_mw_permission("{$permissionPrefix}delete")],
                    'uses'       => $controller . '@deletable',
                ]);

                $router->put('{key}', [
                    'as'         => 'update',
                    'middleware' => [
                        cms_mw_permission("{$permissionPrefix}edit"),
                        StoreActiveFormContext::class,
                    ],
                    'uses'       => $controller . '@update',
                ]);

                $router->delete('{key}', [
                    'as'         => 'destroy',
                    'middleware' => [cms_mw_permission("{$permissionPrefix}delete")],
                    'uses'       => $controller . '@destroy',
                ]);
            }
        );
    }
588024
public function bootApiRouting(Router $router)
    {
        if (!$this->app->make('antares.request')->shouldMakeApiResponse()) {
            return;
        }

        $routerAdapter = $this->app->make(Adapter::class);
        $routes        = [];


        /* @var $route \Illuminate\Routing\Route */
        foreach ($router->getRoutes()->getRoutes() as $route) {
            $routeActionName = $route->getActionName();

            if (starts_with($routeActionName, $this->namespace)) {
                $routes[] = $route;
            }
        }


        $routerAdapter->adaptRoutes($routes, $this->namespace);
    }
1329793
protected function mapForBrowser(Router $router, $routes, $applyAlwaysAuthenticate)
    {
        $middleware = [
            EncryptCookies::class,
            AddQueuedCookiesToResponse::class,
            StartSession::class,
            ShareErrorsFromSession::class,
            VerifyCsrfToken::class,
            SubstituteBindings::class,
        ];

        if ($applyAlwaysAuthenticate && !$this->isWhiteListedAuthRoute($routes)) {
            $middleware[] = Authenticate::class;
        }

        $router->group(['middleware' => $middleware], function (Router $router) use ($routes) {
            $routes->map($router);
        });
    }
235683
public function boot(Router $router): void
    {
        // Load resources
        $this->loadRoutes($router);
        ! $this->app->runningInConsole() || $this->loadMigrationsFrom(__DIR__.'/../../database/migrations');

        // Publish Resources
        ! $this->app->runningInConsole() || $this->publishResources();
    }
161024
public function boot(Router $router): void
    {
        // Bind route models and constrains
        $router->pattern('service', '[a-zA-Z0-9-]+');
        $router->pattern('service_rate', '[a-zA-Z0-9-]+');
        $router->pattern('service_booking', '[a-zA-Z0-9-]+');
        $router->pattern('service_availability', '[a-zA-Z0-9-]+');
        $router->pattern('event_booking', '[a-zA-Z0-9-]+');
        $router->pattern('event_ticket', '[a-zA-Z0-9-]+');
        $router->pattern('event', '[a-zA-Z0-9-]+');

        $router->model('service', config('cortex.bookings.models.service'));
        $router->model('service_rate', config('cortex.bookings.models.service_rate'));
        $router->model('service_booking', config('cortex.bookings.models.service_booking'));
        $router->model('service_availability', config('cortex.bookings.models.service_availability'));
        $router->model('event_booking', config('cortex.bookings.models.event_booking'));
        $router->model('event_ticket', config('cortex.bookings.models.event_ticket'));
        $router->model('event', config('cortex.bookings.models.event'));

        // Map relations
        Relation::morphMap([
            'service' => config('cortex.bookings.models.service'),
            'service_rate' => config('cortex.bookings.models.service_rate'),
            'service_booking' => config('cortex.bookings.models.service_booking'),
            'service_availability' => config('cortex.bookings.models.service_availability'),
            'event_booking' => config('cortex.bookings.models.event_booking'),
            'event_ticket' => config('cortex.bookings.models.event_ticket'),
            'event' => config('cortex.bookings.models.event'),
        ]);

        // Load resources
        require __DIR__.'/../../routes/breadcrumbs/adminarea.php';
        $this->loadRoutesFrom(__DIR__.'/../../routes/web/adminarea.php');
        $this->loadViewsFrom(__DIR__.'/../../resources/views', 'cortex/bookings');
        $this->loadTranslationsFrom(__DIR__.'/../../resources/lang', 'cortex/bookings');
        ! $this->app->runningInConsole() || $this->loadMigrationsFrom(__DIR__.'/../../database/migrations');
        $this->app->runningInConsole() || $this->app->afterResolving('blade.compiler', function () {
            require __DIR__.'/../../routes/menus/adminarea.php';
        });

        // Publish resources
        ! $this->app->runningInConsole() || $this->publishResources();
    }