Define your route model bindings, pattern filters, etc.

@param   \Illuminate\Routing\Router  $router
@return void
507999
public function boot()
    {
        parent::boot();

        
        if (Request::is('*/testimonial/testimonial/*')) {
            Route::bind('testimonial', function ($testimonial) {
                $testimonialrepo = $this->app->make('Litecms\Testimonial\Interfaces\TestimonialRepositoryInterface');
                return $testimonialrepo->findorNew($testimonial);
            });
        }

    }
332964
protected function buildMetaRoutes(Router $router)
    {
        $router->group(
            [
                'prefix' => 'meta',
            ],
            function (Router $router) {

                $router->post('set-locale', [
                    'as'   => NamedRoute::LOCALE_SET,
                    'uses' => LocaleController::class . '@setLocale',
                ]);
            }
        );

    }
965183
public function boot(Router $router)
    {

        // Include the Routes
        $this->add_routes();

        // Publish the JS & CSS, and Database migrations
        $this->add_publications();

        // Inform Laravel how to load migrations
        $this->add_migrations();

        // Add the views for the 'web' namespace
        $this->add_views();

        // Add the view composers
        $this->add_view_composers();

        // Include our translations
        $this->add_translations();

        // Add middleware
        $this->add_middleware($router);

        // Add event listeners
        $this->add_events();

        // Add Validators
        $this->add_custom_validators();

        // Configure the queue dashboard
        $this->configure_horizon();

        // Configure API
        $this->configure_api();
    }
1077986
public function boot(Router $router)
    {
        $this->loadRoutesFrom(__DIR__ . '/../Http/routes.php');

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

        $this->assetsToPublish();

        $this->setViewComposers();

        $this->loadTranslationsFrom(__DIR__.'/../../../lang', 'laramanager');

        Validator::extend('unique_filename', 'PhilMareu\Laramanager\Validators\UniqueFilenameValidator@validate');
        Validator::extend('model_must_exist', 'PhilMareu\Laramanager\Validators\ModelMustExistValidator@validate');
        Validator::replacer('model_must_exist', function($message, $attribute, $rule, $parameters) {
            return trans('laramanager::validation.model_must_exist');
        });
    }
377093
public function boot(Router $router): void
    {
        // Fix the specified key was too long error
        Schema::defaultStringLength(191);

        // Override presence verifier
        $this->app['validator']->setPresenceVerifier($this->app['cortex.foundation.presence.verifier']);

        // Early set application locale globaly
        $router->pattern('locale', '[a-z]{2}');
        $this->app['laravellocalization']->setLocale();

        $router->model('media', config('medialibrary.media_model'));

        // Map relations
        Relation::morphMap([
            'media' => config('medialibrary.media_model'),
        ]);

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

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

        SessionFacade::extend('database', function ($app) {
            $table = $app['config']['session.table'];

            $lifetime = $app['config']['session.lifetime'];
            $connection = $app['config']['session.connection'];

            return new \Cortex\Foundation\Overrides\Illuminate\Session\DatabaseSessionHandler(
                $app['db']->connection($connection), $table, $lifetime, $app
            );
        });

        $this->app->booted(function () {
            if ($this->app->routesAreCached()) {
                require $this->app->getCachedRoutesPath();
            } else {
                $this->app['router']->getRoutes()->refreshNameLookups();
                $this->app['router']->getRoutes()->refreshActionLookups();
            }
        });

        Collection::macro('similar', function (Collection $newCollection) {
            return $newCollection->diff($this)->isEmpty() && $this->diff($newCollection)->isEmpty();
        });
    }
472277
public function setupRoutes(Router $router)
    {
        $router->group(['namespace' => 'LuisMareze\GeoManager\app\Http\Controllers'], function ($router) {
            // Admin Interface Routes
            Route::group(['middleware' => ['web', 'admin'], 'prefix' => 'admin'], function () {
                // LuisMareze\GeoManager routes
                Route::get('geo/create/{template}', 'Admin\GeoCrudController@create');
                Route::get('geo/{id}/edit/{template}', 'Admin\GeoCrudController@edit');

                // This triggered an error before publishing the GeoTemplates trait, when calling Route::controller();
                // CRUD::resource('geo', 'Admin\GeoCrudController');

                // So for GeoCrudController all routes are explicitly defined:
                Route::get('geo/reorder', 'Admin\GeoCrudController@reorder');
                Route::get('geo/reorder/{lang}', 'Admin\GeoCrudController@reorder');
                Route::post('geo/reorder', 'Admin\GeoCrudController@saveReorder');
                Route::post('geo/reorder/{lang}', 'Admin\GeoCrudController@saveReorder');
                Route::get('geo/{id}/details', 'Admin\GeoCrudController@showDetailsRow');
                Route::get('geo/{id}/translate/{lang}', 'Admin\GeoCrudController@translateItem');
                Route::resource('geo', 'Admin\GeoCrudController');
            });
        });
    }
226381
public function boot(Router $router)
    {
        $this->publishes([
            __DIR__ . '/Config/version.php' => config_path('version.php'),
        ], 'version');

        $this->app->singleton('version', function ($app) {
            return new Version($app);
        });
    }
128147
public function setRouter(Router $router) {
        $this->set('router', $router);

        $this->_router = $this->get('router');

        return $this;
    }
767646
public function setRouter(Symfony\Component\Routing\Router $router)
    {
        $this->router = $router;

        return $this;
    }
518430
public function boot(Router $router)
	{
        $attributes = [
            'prefix'     => config('lia.route.prefix').'/trans',
            'namespace'  => 'Lia\Addons\TranslationManager',
            'middleware' => ['api', 'jwt.auth'],
            'as'         => 'trans.'
        ];

        $router->group($attributes, function($router)
        {
            $router->get('/{groupKey?}', 'Controller@getIndex')->where('groupKey', '.*')->name('getIndex');
            $router->post('/add/{groupKey}', 'Controller@postAdd')->where('groupKey', '.*')->name('postAdd');
            $router->post('/edit/{groupKey}', 'Controller@postEdit')->where('groupKey', '.*')->name('postEdit');
            $router->post('/groups/add', 'Controller@postAddGroup')->name('postAddGroup');
            $router->post('/delete/{groupKey}/{translationKey}', 'Controller@postDelete')->where('groupKey', '.*')->name('postDelete');
            $router->post('/import', 'Controller@postImport')->name('postImport');
            $router->post('/find', 'Controller@postFind')->name('postFind');
            $router->post('/locales/add', 'Controller@postAddLocale')->name('postAddLocale');
            $router->post('/locales/remove', 'Controller@postRemoveLocale')->name('postRemoveLocale');
            $router->post('/publish/{groupKey}', 'Controller@postPublish')->where('groupKey', '.*')->name('postPublish');
        });
	}
956414
protected function mapWebRoutes(Router $router)
    {
        $this->mapArticleRoutes($router);
        $this->mapCategoryRoutes($router);
        $this->mapTagsRoutes($router);
        $this->mapAdministratorAuthenticationRoutes($router);
        $this->mapAdministratorRoutes($router);
        $this->mapFrontendRoutes($router);
    }
30679
public static function apiRoutes(\Illuminate\Routing\Router $router)
    {
        $router->group(['prefix' => 'translations'], function (\Illuminate\Routing\Router $router) {

            $router->get('/index', [
                'as'   => 'translations.api.index',
                'uses' => ApiController::class . '@index'
            ]);
        });
    }
1170238
public static function registerRoutes(Router $router)
    {
        $routeName = 'admin.display.column.move-up';
        if (! $router->has($routeName)) {
            $router->group(['namespace' => 'SleepingOwl\Admin\Http\Controllers'],
                function ($router) use ($routeName) {
                    $router->post('{adminModel}/{adminModelId}/up', [
                        'as'   => $routeName,
                        'uses' => 'DisplayColumnController@orderUp',
                    ]);
                });
        }

        $routeName = 'admin.display.column.move-down';
        if (! $router->has($routeName)) {
            $router->group(['namespace' => 'SleepingOwl\Admin\Http\Controllers'],
                function ($router) use ($routeName) {
                    $router->post('{adminModel}/{adminModelId}/down', [
                        'as'   => $routeName,
                        'uses' => 'DisplayColumnController@orderDown',
                    ]);
                });
        }
    }
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');
    }
495702
public function mapApiRoutes(Router $router)
    {
        foreach ($this->modules as $module) {
            $module->mapApiRoutes($router);
        }
    }
519434
public function boot(Router $router)
    {
        // Publish migrations, config and seeders
        $this->publishes([
            __DIR__.'/../migrations/' => base_path('/database/migrations')
        ], 'migrations');

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

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

        // Routes
        if (config('filer.routes')) {
            $router->group(['prefix' => config('filer.route_prefix'), 'middleware' => 'web'], function ($router) {
                Filer::routes($router);
            });
        }
    }
941323
public function prepandRoutes(IRouter $router, array $routes): void
	{
		if (empty($routes)) {
			return;
		}

		if (!($router instanceof \Traversable) || !($router instanceof \ArrayAccess)) {
			throw new ApiRouteWrongRouterException(sprintf(
				'ApiRoutesResolver can not add ApiRoutes to your router. Use for example %s instead',
				RouteList::class
			));
		}

		$user_routes = $this->findAndDestroyUserRoutes($router);

		/**
		 * Add ApiRoutes first
		 */
		foreach ($routes as $route) {
			$router[] = $route;
		}

		/**
		 * User routes on second place
		 */
		foreach ($user_routes as $route) {
			$router[] = $route;
		}
	}