Load admin routes and register middleware
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();
    }
446940
function bindMiddlewares() {
		var modelName,
			_this = this;

		for(modelName in Rhapsody.models) {

			(function(model) {

				model.options.middlewares.forEach(function(middleware) {
					if(typeof middleware !== 'function') {
						middleware = require(path.join(Rhapsody.root, '/app/middlewares/' + middleware));
					}

					modelName = '/' + modelName;

					_this.router.post(modelName, middleware);
					_this.router.post(modelName + '/:id/:relationship', middleware);
					_this.router.get(modelName + '/:id?', middleware);
					_this.router.get(modelName + '/:id/:relationship', middleware);
					_this.router.put(modelName + '/:id', middleware);
					_this.router.patch(modelName + '/:id', middleware);
					_this.router.delete(modelName + '/:id', middleware);
				});

			}(Rhapsody.models[modelName]));
		}
	}
835385
public function boot()
    {
    	// the main router
	    $this->loadRoutesFrom(__DIR__.'/Routes/private_routes.php');
	    $this->loadRoutesFrom(__DIR__.'/Routes/public_routes.php');
	    // the main views folder
	    $this->loadViewsFrom(__DIR__ . '/Views', 'laravel_file_manager');
	    // the main migration folder for create sms_ir tables

	    // for publish the views into main app
	    $this->publishes([
		    __DIR__ . '/Views' => resource_path('views/vendor/laravel_file_manager'),
	    ]);

	    //publish storage file
         $this->publishes([
                    __DIR__ . '/Storage/SystemFiles' => \Storage::disk(config('laravel_file_manager.driver_disk'))->path(config('laravel_file_manager.main_storage_folder_name').'\System'),
                ]);

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

	    // for publish the assets files into main app
	    $this->publishes([
		    __DIR__.'/assets' => public_path('vendor/laravel_file_manager'),
	    ], 'public');

	    // for publish the sms_ir config file to the main app config folder
	    $this->publishes([
		    __DIR__ . '/Config/LFM.php' => config_path('laravel_file_manager.php'),
	    ]);

        // publish language
        $this->publishes([
            __DIR__ . '/Lang/En/Filemanager.php' => resource_path('lang/en/filemanager.php'),
        ]);
        $this->publishes([
            __DIR__ . '/Lang/Fa/Filemanager.php' => resource_path('lang/fa/filemanager.php'),
        ]);

        $this->publishes([
            __DIR__ . '/Traits/lfmFillable.php' => app_path('Traits/lfmFillable.php'),
        ]);
    }
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');
        });
    }
137477
protected function routes()
    {
        if ($this->app->routesAreCached()) {
            return;
        }

        Route::middleware(['nova', Authorize::class])
            ->prefix('nova-vendor/nova-spotify-auth-tool')
            ->group(__DIR__.'/../routes/web.php');

        Route::middleware(['nova', Authorize::class])
            ->prefix('nova-vendor/nova-spotify-auth-tool')
            ->group(__DIR__.'/../routes/api.php');
    }
439384
public function bootstrap()
    {
        $this->router = $this->app['router'];
        $this->middlewareGroups = array_merge([], $this->middlewareGroups, config('routing.middlewareGroups', []));
        $this->routeMiddleware = array_merge([], $this->routeMiddleware, config('routing.routeMiddleware', []));

        foreach ($this->middlewareGroups as $key => $middleware) {
            $this->router->middlewareGroup($key, $middleware);
        }

        foreach ($this->routeMiddleware as $key => $middleware) {
            $this->router->middleware($key, $middleware);
        }
    }
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']);
    }
882183
function Router() {
  var self = this;
  this._routes = {};

  this.middleware = function(req, res, next) {
    self._dispatch(req, res, next);
  };
}
187778
protected function registerRoutes()
    {
        Route::group([
            'domain' => config('horizon.domain', null),
            'prefix' => config('horizon.path'),
            'namespace' => 'Laravel\Horizon\Http\Controllers',
            'middleware' => config('horizon.middleware', 'web'),
        ], function () {
            $this->loadRoutesFrom(__DIR__.'/../routes/web.php');
        });
    }
104193
protected function loadRoutes()
    {
        if ($this->eye->laravelVersionIs('>=', '5.4.0')) {
            Route::aliasMiddleware('eyewitness_auth', Authenticate::class);
        } else {
            Route::middleware('eyewitness_auth', Authenticate::class);
        }

        if (! $this->app->routesAreCached()) {
            require __DIR__.'/../routes/web.php';
            require __DIR__.'/../routes/assets.php';
            require __DIR__.'/../routes/api.php';
            require __DIR__.'/../routes/auth.php';
        }
    }
1267015
protected static function register()
	{
		Route::group(['prefix' => static::$prefix, 'middleware' => static::$middleware, 'namespace' => static::$namespace], function()
		{
			Route::get('register','ShowRegister\Responder')->name('auth.register');

			Route::post('register', 'Register\Responder')->name('auth.register');

			Route::get('password-forgot', 'ShowForgotPassword\Responder')->name('auth.password.forgot');

			Route::post('password-forgot', 'ForgotPassword\Responder')->name('auth.password.forgot.submit');

			Route::get('password-reset/{token}', 'ShowResetPassword\Responder')->name('password.reset');

			Route::post('password-reset/{token}', 'ResetPassword\Responder')->name('auth.password.reset');

			Route::get('login', 'ShowLogin\Responder')->name('auth.login');

			Route::post('login', 'Login\Responder')->name('auth.login');

			Route::get('logout', 'Logout\Responder')->name('auth.logout');
		});
	}
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');
        });
    }
654899
protected function loadRoutes()
    {
        $builder = Router::createRouteBuilder('/');

        if ($this->app instanceof HttpApplicationInterface) {
            $this->app->routes($builder);
        }
        if ($this->app instanceof PluginApplicationInterface) {
            $this->app->pluginRoutes($builder);
        }
    }
1339924
private function registerRoutes()
    {
        $path = config('wink.path');
        $middlewareGroup = config('wink.middleware_group');

        Route::namespace('Wink\Http\Controllers')
            ->middleware($middlewareGroup)
            ->as('wink.')
            ->prefix($path)
            ->group(function () {
                Route::get('/login', 'LoginController@showLoginForm')->name('auth.login');
                Route::post('/login', 'LoginController@login')->name('auth.attempt');

                Route::get('/password/forgot', 'ForgotPasswordController@showResetRequestForm')->name('password.forgot');
                Route::post('/password/forgot', 'ForgotPasswordController@sendResetLinkEmail')->name('password.email');
                Route::get('/password/reset/{token}', 'ForgotPasswordController@showNewPassword')->name('password.reset');
            });

        Route::namespace('Wink\Http\Controllers')
            ->middleware([$middlewareGroup, Authenticate::class])
            ->as('wink.')
            ->prefix($path)
            ->group(function () {
                $this->loadRoutesFrom(__DIR__.'/Http/routes.php');
            });
    }
1287886
def routes_register(app, handler, *paths, methods=None, router=None, name=None):
    """"""
    if router is None:
        router = app.router

    handler = to_coroutine(handler)

    resources = []

    for path in paths:

        # Register any exception to app
        if isinstance(path, type) and issubclass(path, BaseException):
            app._error_handlers[path] = handler
            continue

        # Ensure that names are unique
        name = str(name or '')
        rname, rnum = name, 2
        while rname in router:
            rname = "%s%d" % (name, rnum)
            rnum += 1

        path = parse(path)
        if isinstance(path, RETYPE):
            resource = RawReResource(path, name=rname)
            router.register_resource(resource)

        else:
            resource = router.add_resource(path, name=rname)

        for method in methods or [METH_ANY]:
            method = method.upper()
            resource.add_route(method, handler)

        resources.append(resource)

    return resources
1214237
private function mapAdminRoutes()
    {
        $this->name('backups.')
            ->prefix($this->config()->get('arcanesoft.backups.route.prefix', 'backups'))
            ->group(function () {
                Routes\StatusesRoutes::register();
            });
    }
1128231
public function register_routes() {

		register_rest_route(
			$this->namespace, '/' . $this->rest_base, [
				[
					'methods' => \WP_REST_Server::READABLE,
					'callback' => [ $this, 'get_items' ],
					'permission_callback' => [ $this, 'get_items_permissions_check' ],
					'args' => $this->get_collection_params(),
				],
				'schema' => [ $this, 'get_public_item_schema' ],
			]
		);
	}