Register routes for laravel-admin.

@return void
510567
protected static function registerRoutes()
    {
        parent::routes(function ($router) {
            /* @var \Illuminate\Routing\Router $router */
            $router->get('backup', 'Encore\Admin\Backup\BackupController@index')->name('backup-list');
            $router->get('backup/download', 'Encore\Admin\Backup\BackupController@download')->name('backup-download');
            $router->post('backup/run', 'Encore\Admin\Backup\BackupController@run')->name('backup-run');
            $router->delete('backup/delete', 'Encore\Admin\Backup\BackupController@delete')->name('backup-delete');
        });
    }
690390
private function registerModuleRoutes()
    {
        $this->app->singleton('typicms.routes', function (Application $app) {
            try {
                return $app->make('Pages')->with('files')->getForRoutes();
            } catch (Exception $e) {
                return [];
            }
        });
    }
693270
public function register()
    {
        $this->mergeConfigFrom(__DIR__ . '/../config/translator.php', 'translator');

        parent::register();
        $this->registerCacheRepository();
        $this->registerFileLoader();
        $this->registerCacheFlusher();
        $this->app->singleton('translation.uri.localizer', UriLocalizer::class);
        $this->app[\Illuminate\Routing\Router::class]->aliasMiddleware('localize', TranslationMiddleware::class);
        // Fix issue with laravel prepending the locale to localize resource routes:
        $this->app->bind('Illuminate\Routing\ResourceRegistrar', ResourceRegistrar::class);
    }
796189
private function registerControllers()
    {
        $this->_controller = new Controller();
        $this->_controller->load($this->_router,
        $this->_config->get('basepath'));
    }
1051408
public static function routes()
    {
        Route::name('public::blog.')
            ->prefix('blog')
            ->namespace('\\Arcanesoft\\Blog\\Http\\Controllers\\Front')
            ->group(function () {
                Routes\PostsRoutes::register();
                Routes\CategoriesRoutes::register();
                Routes\TagsRoutes::register();
            });
    }
183592
protected static function registerRoutes()
    {
        parent::routes(function ($router) {
            /* @var \Illuminate\Routing\Router $router */
            $router->get('logs', 'Encore\Admin\LogViewer\LogController@index')->name('log-viewer-index');
            $router->get('logs/{file}', 'Encore\Admin\LogViewer\LogController@index')->name('log-viewer-file');
            $router->get('logs/{file}/tail', 'Encore\Admin\LogViewer\LogController@tail')->name('log-viewer-tail');
        });
    }
1214237
private function mapAdminRoutes()
    {
        $this->name('backups.')
            ->prefix($this->config()->get('arcanesoft.backups.route.prefix', 'backups'))
            ->group(function () {
                Routes\StatusesRoutes::register();
            });
    }
744606
protected function registerAdminCommand()
    {
        $this->app->singleton('command.authentication.user.admin', function ($app) {
            return $app->make(Admin::class);
        });
        $this->commands('command.authentication.user.admin');
    }
133116
protected function mapAdminRoutes()
    {
        $this->name('seo.')
             ->prefix($this->config()->get('arcanesoft.seo.route.prefix', 'seo'))
             ->group(function () {
                 Routes\Admin\DashboardRoutes::register();
                 Routes\Admin\PagesRoutes::register();
                 Routes\Admin\FootersRoutes::register();
                 Routes\Admin\MetasRoutes::register();
                 Routes\Admin\RedirectsRoutes::register();
                 Routes\Admin\SpammersRoutes::register();
                 Routes\Admin\SettingsRoutes::register();
             });
    }
1137037
protected function registerWidgets()
    {
        $default_widgets = ['LaravelAdminPanel\\Widgets\\UserDimmer', 'LaravelAdminPanel\\Widgets\\PostDimmer', 'LaravelAdminPanel\\Widgets\\PageDimmer'];
        $widgets = config('admin.dashboard.widgets', $default_widgets);

        foreach ($widgets as $widget) {
            Widget::group('admin::dimmers')->addWidget($widget);
        }
    }
713862
protected function registerRoutes()
    {
        $this->get($this['imagine.thumbnail_url'] . '{size}/{checksum}/{path}', function (Application $app, Request $request, $path, $size, $checksum) { return $app['controllers.imagine']->resizeImageAction($request, $path, $size, $checksum); })->assert('path', '.+');
        $this->get('', function (Application $app, Request $request) { return $app['controllers.page']->showHomePageAction($request); });
        $this->error(function (NotFoundHttpException $e, $code) { return $this['controllers.error']->notFoundAction($e); });
        $this->error(function (\Exception $e, $code) { return $this['controllers.error']->internalServerErrorAction($e); });
    }
1020740
protected function registerRoutes()
    {
        $this->app['router']->group([
            'namespace' => __NAMESPACE__ . '\Http\Controllers'
        ], function($router) {
            $router->get('votee/test', ['uses' => 'VoteeController@test', 'as' => 'votee.test']);
            $router->post('votee/up', ['uses' => 'VoteeController@up', 'as' => 'votee.up']);
            $router->post('votee/down', ['uses' => 'VoteeController@down', 'as' => 'votee.down']);
        });
    }
255943
protected function registerCustomRoutes()
    {
        if (file_exists($file = $this->getBootstrapPath('routes.php'))) {
            $this->registerRoutes(function (Router $route) use ($file) {
                require $file;
            });
        }
    }
71406
protected function registerRoutings()
    {
        $yamlConfig = new YamlConfig('', $this->configFiles['routing']);
        $parameters = $yamlConfig->read();

        $hasNewRoutings = false;

        $routings = $this->kernelConfig->getRoutings();

        if (!count($routings)) {
            return false;
        }

        foreach ($routings as $routing) {
            // Check if the routing is already defined.
            if (isset($parameters[$routing['name']])) {
                continue;
            }

            $hasNewRoutings = true;

            // Add the config to the imports
            $parameters[$routing['name']] = array(
                'resource' => $routing['resource'],
                'prefix' => $routing['prefix'],
            );
        }

        if (!$hasNewRoutings) {
            return;
        }

        $yamlConfig = new YamlConfig('', $this->configFiles['routing']);
        $yamlConfig->write($parameters);
        $yamlConfig->clean();
    }
423760
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();
    }
57598
private function registerRoutes()
    {
        $config = $this->app->make('community_translation/config');
        $onlineTranslationPath = $config->get('options.onlineTranslationPath');
        $apiEntryPoint = $config->get('options.api.entryPoint');
        $handleRegex = '[A-Za-z0-9]([A-Za-z0-9\_]*[A-Za-z0-9])?';
        $localeRegex = '[a-zA-Z]{2,3}([_\-][a-zA-Z0-9]{2,3})?';
        $this->app->make(Router::class)->registerMultiple([
            // Online Translation
            "$onlineTranslationPath/{packageVersionID}/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::view',
                null,
                ['packageVersionID' => 'unreviewed|[1-9][0-9]*', 'localeID' => $localeRegex],
                [],
                '',
                [],
                ['GET'],
            ],
            "$onlineTranslationPath/action/save_comment/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::save_comment',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/delete_comment/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::delete_comment',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/load_all_places/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::load_all_places',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/process_translation/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::process_translation',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/load_translation/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::load_translation',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/save_glossary_term/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::save_glossary_term',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/delete_glossary_term/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::delete_glossary_term',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/download/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::download',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/upload/{localeID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::upload',
                null,
                ['localeID' => $localeRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$onlineTranslationPath/action/save_notifications/{packageID}" => [
                'Concrete\Package\CommunityTranslation\Controller\Frontend\OnlineTranslation::save_notifications',
                null,
                ['packageID' => '\d+'],
                [],
                '',
                [],
                ['POST'],
            ],
            // API Entry Points
            "$apiEntryPoint/rate-limit/" => [
                'CommunityTranslation\Api\EntryPoint::getRateLimit',
                null,
                [],
                [],
                '',
                [],
                ['GET'],
            ],
            "$apiEntryPoint/locales/" => [
                'CommunityTranslation\Api\EntryPoint::getLocales',
                null,
                [],
                [],
                '',
                [],
                ['GET'],
            ],
            "$apiEntryPoint/packages/" => [
                'CommunityTranslation\Api\EntryPoint::getPackages',
                null,
                [],
                [],
                '',
                [],
                ['GET'],
            ],
            "$apiEntryPoint/package/{packageHandle}/versions/" => [
                'CommunityTranslation\Api\EntryPoint::getPackageVersions',
                null,
                ['packageHandle' => $handleRegex],
                [],
                '',
                [],
                ['GET'],
            ],
            "$apiEntryPoint/package/{packageHandle}/{packageVersion}/locales/{minimumLevel}/" => [
                'CommunityTranslation\Api\EntryPoint::getPackageVersionLocales',
                null,
                ['packageHandle' => $handleRegex, 'minimumLevel' => '[0-9]{1,3}'],
                [],
                '',
                [],
                ['GET'],
            ],
            "$apiEntryPoint/package/{packageHandle}/{packageVersion}/translations/{localeID}/{formatHandle}/" => [
                'CommunityTranslation\Api\EntryPoint::getPackageVersionTranslations',
                null,
                ['packageHandle' => $handleRegex, 'localeID' => $localeRegex, 'formatHandle' => $handleRegex],
                [],
                '',
                [],
                ['GET'],
            ],
            "$apiEntryPoint/fill-translations/{formatHandle}/" => [
                'CommunityTranslation\Api\EntryPoint::fillTranslations',
                null,
                ['formatHandle' => $handleRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$apiEntryPoint/package/{packageHandle}/{packageVersion}/translatables/{formatHandle}/" => [
                'CommunityTranslation\Api\EntryPoint::importPackageVersionTranslatables',
                null,
                ['packageHandle' => $handleRegex, 'formatHandle' => $handleRegex],
                [],
                '',
                [],
                ['POST'],
            ],
            "$apiEntryPoint/translations/{localeID}/{formatHandle}/{approve}/" => [
                'CommunityTranslation\Api\EntryPoint::importTranslations',
                null,
                ['localeID' => $localeRegex, 'formatHandle' => $handleRegex, 'approve' => '[01]'],
                [],
                '',
                [],
                ['POST'],
            ],
            "$apiEntryPoint/import/package/" => [
                'CommunityTranslation\Api\EntryPoint::importPackage',
                null,
                [],
                [],
                '',
                [],
                ['PUT'],
            ],
            "$apiEntryPoint/{unrecognizedPath}" => [
                'CommunityTranslation\Api\EntryPoint::unrecognizedCall',
                null,
                ['unrecognizedPath' => '.*'],
            ],
            "$apiEntryPoint" => [
                'CommunityTranslation\Api\EntryPoint::unrecognizedCall',
            ],
        ]);
    }
937799
protected function registerRoutes()
    {
        $this->app['router']->group([
            'middleware' => config('bone.captcha.middleware', 'web'),
            'namespace'  => 'Igoshev\Captcha\Controllers',
            'as'         => 'bone.captcha.'
        ], function ($router) {
            $router->get(config('bone.captcha.routes.image'), 'CaptchaController@image')->name('image');
            $router->get(config('bone.captcha.routes.image_tag'), 'CaptchaController@imageTag')->name('image.tag');
        });
    }