Register routes for laravel-admin.

@return void
171355
protected static function registerRoutes()
    {
        parent::routes(function ($router) {
            /* @var \Illuminate\Routing\Router $router */
            $router->get('redis', 'Encore\Admin\RedisManager\RedisController@index')->name('redis-index');
            $router->delete('redis/key', 'Encore\Admin\RedisManager\RedisController@destroy')->name('redis-key-delete');
            $router->get('redis/fetch', 'Encore\Admin\RedisManager\RedisController@fetch')->name('redis-fetch-key');
            $router->get('redis/create', 'Encore\Admin\RedisManager\RedisController@create')->name('redis-create-key');
            $router->post('redis/store', 'Encore\Admin\RedisManager\RedisController@store')->name('redis-store-key');
            $router->get('redis/edit', 'Encore\Admin\RedisManager\RedisController@edit')->name('redis-edit-key');
            $router->put('redis/key', 'Encore\Admin\RedisManager\RedisController@update')->name('redis-update-key');
            $router->delete('redis/item', 'Encore\Admin\RedisManager\RedisController@remove')->name('redis-remove-item');

            $router->get('redis/console', 'Encore\Admin\RedisManager\RedisController@console')->name('redis-console');
            $router->post('redis/console', 'Encore\Admin\RedisManager\RedisController@execute')->name('redis-execute');
        });
    }
163445
public function register()
    {
        $this->app['routes.javascript'] = $this->app->share(function ($app) {
            $generator = new Generators\RoutesJavascriptGenerator($app['files'], $app['router']);
            return new Commands\RoutesJavascriptCommand($generator);
        });

        $this->commands('routes.javascript');
    }
1175519
public function registerAll()
    {
        /** @var LanguageService $service */
        $service   = resolve(LanguageService::class);
        $languages = $service->getAllEnabled();
        foreach ($this->routes['ml'] as $value) {
            foreach ($languages as $language) {
                $prefix = null;
                if (!$language->is_default) {
                    $prefix = $language->code;
                }
                Route::group(
                    array_merge(['prefix' => $prefix], $value['groupArgs']),
                    function ($router) use ($value, $language) {
                        $value['closure']($router, $language->code);
                    }
                );
            }
        }
        foreach ($this->routes['regular'] as $value) {
            Route::group(
                $value['groupArgs'],
                function ($router) use ($value) {
                    $value['closure']($router);
                }
            );
        }
        if (!empty($this->routes['catchAll'])) {
            Route::group(
                $this->routes['catchAll']['groupArgs'],
                function ($router) {
                    $this->routes['catchAll']['closure']($router);
                }
            );
        }

        $router = resolve('router');
        $router->getRoutes()->refreshActionLookups();
        $router->getRoutes()->refreshNameLookups();
    }
207827
public function registerRoutes()
    {
        if ($this->app->routesAreCached()) {
            return;
        }

        Route::domain((string) config('platform.domain'))
            ->prefix(Dashboard::prefix('/press'))
            ->as('platform.')
            ->middleware(config('platform.middleware.private'))
            ->group(realpath(PLATFORM_PATH.'/routes/press.php'));
    }
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');
        });
    }
960012
public function register_routes() {

		register_rest_route( $this->namespace, '/' . $this->rest_base, array(
			array(
				'methods'         => WP_REST_Server::READABLE,
				'callback'        => array( $this, 'get_items' ),
				'permission_callback' => array( $this, 'get_items_permissions_check' ),
				'args'            => $this->get_collection_params(),
			),
			array(
				'methods'         => WP_REST_Server::CREATABLE,
				'callback'        => array( $this, 'create_item' ),
				'permission_callback' => array( $this, 'create_item_permissions_check' ),
				'args'            => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		) );
		register_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\d]+)', array(
			array(
				'methods'         => WP_REST_Server::READABLE,
				'callback'        => array( $this, 'get_item' ),
				'permission_callback' => array( $this, 'get_item_permissions_check' ),
				'args'            => array(
					'context'          => $this->get_context_param( array( 'default' => 'view' ) ),
				),
			),
			array(
				'methods'         => WP_REST_Server::EDITABLE,
				'callback'        => array( $this, 'update_item' ),
				'permission_callback' => array( $this, 'update_item_permissions_check' ),
				'args'            => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),
			),
			array(
				'methods' => WP_REST_Server::DELETABLE,
				'callback' => array( $this, 'delete_item' ),
				'permission_callback' => array( $this, 'delete_item_permissions_check' ),
				'args' => array(
					'force'    => array(
						'default'     => false,
						'description' => __( 'Required to be true, as resource does not support trashing.' ),
					),
					'reassign' => array(),
				),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		) );

		register_rest_route( $this->namespace, '/' . $this->rest_base . '/me', array(
			'methods'         => WP_REST_Server::READABLE,
			'callback'        => array( $this, 'get_current_item' ),
			'args'            => array(
				'context'          => array(),
			),
			'schema' => array( $this, 'get_public_item_schema' ),
		));
	}
1143644
public function register()
    {
        $this->app->singleton('parameters', function ($app) {
            return new Parameters;
        });

        // Find the default Controller class of the current Laravel application
        $controllerClass = $this->app['config']->get(
            'authority-controller.controllerClass',
            'Illuminate\Routing\Controller'
        );

        $this->app->resolving(function ($object) use ($controllerClass) {
            // Check if the current $object class is a Controller class and if it responds to paramsBeforeFilter method
            if (is_a($object, $controllerClass) && respond_to($object, 'paramsBeforeFilter')) {
                // Fill $params properties of the current controller
                $this->app['parameters']->fillController($object);
            }
        });

        $this->app->singleton('authority', function ($app) {
            $user = $app['auth']->user();
            $authority = new Authority($user);

            $fn = $app['config']->get('authority-controller.initialize');

            $serializer = new Serializer;
            if (is_string($fn)) {
                $fn = $serializer->unserialize($fn);
            }

            if ($fn) {
                $fn($authority);
            }

            return $authority;
        });

        $this->app->bind('Efficiently\AuthorityController\ControllerResource', function ($app, $parameters) {
            list($controller, $resourceName, $resourceOptions) = $parameters;
            return new ControllerResource($controller, $resourceName, $resourceOptions);
        });

    }
1306414
public function register()
    {
        $this->mergeConfigFrom(__DIR__.'/config/scms.php', 'scms');
        $this->initAliases();
        $this->app->register('Cviebrock\EloquentSluggable\SluggableServiceProvider');
        $this->app->register('SleepingOwl\Admin\AdminServiceProvider');
        $this->app->register('Illuminate\Html\HtmlServiceProvider');
        foreach($this->aliases as $alias => $class){
            $this->app->bind($alias, function($app){
                return new $app;
            });
        }
        include __DIR__ . '/routes.php';
    }
340051
public function register()
    {
        $this->app['actions']->listen('admin_menu', function () {
            foreach ($this->adminControllers as $adminController) {
                /** @var AdminPageController $adminController */
                $adminController = $this->app->make($adminController);

                $menuTitle = $adminController->getMenuTitle();

                add_menu_page(
                    $adminController->getTitle(),
                    !empty($menuTitle) ?: $adminController->getTitle(),
                    'manage_options',
                    $adminController->getSlug(),
                    [$adminController, '_render'],
                    $adminController->getIcon(),
                    $adminController->getPosition()
                );
            }
        });
    }
1215994
protected function registerRouteActions()
    {
        // Actions for page routing.
        $this->action->add('load-toplevel_page_'.$this->getSlug(), [$this, 'parseGetRoute']);
        $this->action->add('load-admin_page_'.$this->getSlug(), [$this, 'parseGetRoute']);
        $this->action->add('load-'.$this->findParentHook().'_page_'.$this->getSlug(), [$this, 'parseGetRoute']);
        $this->action->add('admin_init', [$this, 'parsePostRoute']);

        $this->filter->add('admin_title', [$this, 'handleTitle']);
    }
708519
protected function registerMiddlewares()
    {
        if (!$this->app['config']->get('laratrust.middleware.register')) {
            return;
        }

        $router = $this->app['router'];

        if (method_exists($router, 'middleware')) {
            $registerMethod = 'middleware';
        } elseif (method_exists($router, 'aliasMiddleware')) {
            $registerMethod = 'aliasMiddleware';
        } else {
            return;
        }

        foreach ($this->middlewares as $key => $class) {
            $router->$registerMethod($key, $class);
        }
    }
513523
public function bindRoutes()
    {
        $loader = new RouteLoader();

        $loader->registerProviders(RouteLoader::$defaultProviders);

        $loader->bindRoutes($this);
        $this->bindPluginRoutes('plugin.controller_providers.root');
    }
1336988
public function register()
    {
        parent::register();
        $this->mergeConfig();
        $this->registerHelpers();
        $this->bindRepositories();
        $this->bindOtherStuff();

        if (config('app.env') === 'testing') {
            // We're registering all routes here to unify the whole process between Laravel & Orchestra setup
            $this->app->booted(function ($app) {
                $app->make(RoutesService::class)->registerAll();
            });
        }
    }
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();
    }
617808
public function registerRoutes()
    {
        $this->_route = new Route();
        $this->_config = Config::from('app');

        $router = $this; // MUST KEEP!!!!!!!!!

        require_once $this->_config->from('app')->get('routes');
    }
50258
protected function registerRouter()
    {
        $this->app->singleton('router', function ($app) {
            return new Router($app['events'], $app['actions'], $app);
        });

        $this->app['actions']->listen('init', function () {
            if (is_admin()) {
                app('url')->forceRootUrl(env('APP_URL'));
            }
        });

        $this->disableRedirectionOnRegisteredRoutes();
    }
375965
public function register() {
        $this->larapackage('larakit/laravel-larakit', 'larakit', 'public');
        $this->app->bind('larakit:env',
            function ($app) {
                return new \Larakit\Command\Env();
            });
        $this->app->bind('larakit:readiness',
            function ($app) {
                return new \Larakit\Command\Readiness();
            });
        $this->app->bind('larakit:app-provider',
            function ($app) {
                return new \Larakit\Command\AppProvider();
            });
        $this->app->bind('larakit:app-alias',
            function ($app) {
                return new \Larakit\Command\AppAlias();
            });
        $this->app->bind('larakit:app-db',
            function ($app) {
                return new \Larakit\Command\AppDb();
            });
        $this->app->bind('larakit:app-migrate',
            function ($app) {
                return new \Larakit\Command\AppMigrate();
            });
        $this->commands([
            'larakit:env',
            'larakit:app-provider',
            'larakit:app-alias',
            'larakit:app-db',
            'larakit:readiness',
            'larakit:app-migrate',
        ]);
    }