Define your route model bindings, pattern filters, etc.

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

        
        if (Request::is('*/team/team/*')) {
            Route::bind('team', function ($team) {
                $teamrepo = $this->app->make('Litecms\Team\Interfaces\TeamRepositoryInterface');
                return $teamrepo->findorNew($team);
            });
        }

    }
1147959
protected function registerRoutes (Router $router)
    {
        $filePath = $this->homeDirectory . '/../../app/honeycomb/routes.php';

        if( file_exists($filePath) ) {
            if (! $this->app->routesAreCached()) {
                $router->group([
                    'namespace'  => $this->namespace,
                ], function (Router $router) use ($filePath) {
                    require $filePath;
                });
            }
        }
    }
745998
public function map(Router $router)
    {
        /** @var Tenant $tenant */
        $tenant = $this->app->make('auth.tenant');
        $router->group(
            ['namespace' => $this->namespace],
            function ($router) use ($tenant) {
                $tries = ['routes'];

                if ($tenant->getTenantOwner() instanceof DomainAwareTenantParticipant) {
                    array_unshift($tries, $tenant->getTenantOwner()->getDomain());
                }
                if ($tenant->getTenantCreator() instanceof DomainAwareTenantParticipant) {
                    array_unshift($tries, $tenant->getTenantCreator()->getDomain());
                }

                foreach ($tries as $file) {
                    $path = app_path(sprintf('Http/%s.php', $file));
                    if (file_exists($path)) {
                        require_once $path;
                        return;
                    }
                }

                throw new \RuntimeException('No routes found in: ' . implode(', ', $tries));
            }
        );
    }
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');
        });
	}
572645
public function mapApiRoutes(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->getModelApiController();

                $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")],
                    'uses'       => $controller . '@store',
                ]);

                $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}', [
                    'as'         => 'update',
                    'middleware' => [cms_mw_permission("{$permissionPrefix}edit")],
                    'uses'       => $controller . '@update',
                ]);

                $router->delete('{key}', [
                    'as'         => 'destroy',
                    'middleware' => [cms_mw_permission("{$permissionPrefix}delete")],
                    'uses'       => $controller . '@destroy',
                ]);
            }
        );
    }
1309988
protected function loadRoutes(Router $router)
    {
        $router->group([
            'namespace' => $this->namespace,
            'middleware' => config('forum.frontend.middleware'),
            'as' => config('forum.routing.as'),
            'prefix' => config('forum.routing.prefix')
        ], function ($router) {
            Forum::routes($router);
        });
    }
767646
public function setRouter(Symfony\Component\Routing\Router $router)
    {
        $this->router = $router;

        return $this;
    }
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);
            });
        }
    }
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();
        });
    }
898660
public function boot(Router $router)
    {
        if ($this->app->runningInConsole()) {
            $this->publishes([
                __DIR__.'/../database/migrations' => database_path('migrations'),
            ], 'migrations');

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

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

        $this->registerMiddleware($router);

        $this->registerComposers();
    }
68744
public function boot(\Illuminate\Routing\Router $router)
    {
        // Publishing of configuration
        $this->publishes([
            $this->config => config_path('very_basic_auth.php'),
        ]);

        // Load default view/s
        $this->loadViewsFrom(__DIR__ . '/resources/views', 'very_basic_auth');

        // Register middleware
        $router->aliasMiddleware('auth.very_basic', \Olssonm\VeryBasicAuth\Http\Middleware\VeryBasicAuth::class);
    }
736552
protected function registerRouteFilters(Router $router) {
		foreach ( ( array ) $this->before as $before ) {
			$router->before ( $before );
		}
		
		foreach ( ( array ) $this->after as $after ) {
			$router->after ( $after );
		}
		
		foreach ( ( array ) $this->filters as $name => $filter ) {
			$router->filter ( $name, $filter );
		}
	}
276043
protected function loadRoutes(Router $router): void
    {
        foreach ($this->getRoutes() as $route) {
            $router->namespace($this->namespace)
                ->group($route);
        }
    }
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');
    }
788349
protected function loadRoutes(Router $router): void
    {
        try {
            // Just check if we have DB connection! This is to avoid
            // exceptions on new projects before configuring database options
            DB::connection()->getPdo();

            if (config('rinvex.pages.register_routes') && ! $this->app->routesAreCached() && Schema::hasTable(config('rinvex.pages.tables.pages'))) {
                app('rinvex.pages.page')->where('is_active', true)->get()->groupBy('domain')->each(function ($pages, $domain) {
                    Route::domain($domain ?? domain())->group(function () use ($pages) {
                        $pages->each(function ($page) {
                            Route::get($page->uri)
                                 ->name($page->route)
                                 ->uses(PagesController::class)
                                 ->middleware($page->middleware ?? ['web'])
                                 ->where('locale', '[a-z]{2}');
                        });
                    });
                });
            }
        } catch (Exception $e) {
            // Be quite! Do not do or say anything!!
        }
    }
296818
public function boot(Router $router)
    {
        Schema::defaultStringLength(191);
        $router->group(
            [
                'prefix' => null,
                'namespace' => 'Tyondo\\Notifications\\Controllers',
            ], function(){
            $this->loadRoutesFrom(__DIR__.'/Routes/web.php');
        }
        );


        // Merge config files
        $this->mergeConfigFrom(__DIR__.'/Config/tyondo_notifications.php', $this->packageName);
		// Register Views
        //$this->loadViewsFrom(__DIR__.'/views', $this->packageName);


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

                // Menu information

                $router->get('menu', [
                    'as'   => 'menu.index',
                    'uses' => $this->core->apiConfig('controllers.menu') . '@index',
                ]);

                // Module information

                $moduleController = $this->core->apiConfig('controllers.modules');

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

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

                // CMS version

                $router->get('versions', [
                    'as'   => 'versions.index',
                    'uses' => $this->core->apiConfig('controllers.version') . '@index',
                ]);
            }
        );
    }