Bootstrap the application events.

@param  Router  $router
@return void
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);
            });
        }
    }
520317
public function boot()
    {
        parent::boot();

        $this->publishConfig();
        $this->publishViews();
        $this->registerProvider(Providers\RouteServiceProvider::class);
    }
1231982
public function boot(\Illuminate\Routing\Router $router)
    {
        if (!$this->app->routesAreCached()) {
            require __DIR__.'/Routes/web.php';
        }

        $this->publishes([
            __DIR__.'/Config/localizer.php' => config_path('localizer.php'),
        ], 'localizer_config');

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

        $router->aliasMiddleware('localizer', config('localizer.middleware'));
        $this->app->register(IdentifyServiceProvider::class);

        $this->publishes([
                __DIR__.'/Migrations/2016_11_28_115831_add_locale_column.php' => $this->app->databasePath().'/migrations/'.date('Y_m_d_His', time()).'_add_locale_column.php',
        ], 'localizer_migrations');

        if (!config('localizer.dynamic_migration_name')) {
            $this->loadMigrationsFrom(__DIR__.'/Migrations', 'localizer');
        }
    }
598032
public function boot(Router $router)
    {
        // Load auzo middleware
        $router->middleware('auzo.acl', AuzoToolsMiddleware::class);

        // Load auzo validation can rule
        Validator::extend('auzo.can', 'Kordy\AuzoTools\Services\ValidationRules@can');

        // Load auzo language files
        $this->loadTranslationsFrom(__DIR__.'/Translations', 'auzoTools');

        // Publish the configuration file to the application config folder
        $this->publishes([
            __DIR__.'/Config/auzo_tools.php' => config_path('auzo_tools.php'),
        ], 'config');

        // Publish translation files
        $this->publishes([
            __DIR__.'/Translations' => base_path('resources/lang/vendor/auzo-tools'),
        ], 'translations');
    }
161024
public function boot(Router $router): void
    {
        // Bind route models and constrains
        $router->pattern('service', '[a-zA-Z0-9-]+');
        $router->pattern('service_rate', '[a-zA-Z0-9-]+');
        $router->pattern('service_booking', '[a-zA-Z0-9-]+');
        $router->pattern('service_availability', '[a-zA-Z0-9-]+');
        $router->pattern('event_booking', '[a-zA-Z0-9-]+');
        $router->pattern('event_ticket', '[a-zA-Z0-9-]+');
        $router->pattern('event', '[a-zA-Z0-9-]+');

        $router->model('service', config('cortex.bookings.models.service'));
        $router->model('service_rate', config('cortex.bookings.models.service_rate'));
        $router->model('service_booking', config('cortex.bookings.models.service_booking'));
        $router->model('service_availability', config('cortex.bookings.models.service_availability'));
        $router->model('event_booking', config('cortex.bookings.models.event_booking'));
        $router->model('event_ticket', config('cortex.bookings.models.event_ticket'));
        $router->model('event', config('cortex.bookings.models.event'));

        // Map relations
        Relation::morphMap([
            'service' => config('cortex.bookings.models.service'),
            'service_rate' => config('cortex.bookings.models.service_rate'),
            'service_booking' => config('cortex.bookings.models.service_booking'),
            'service_availability' => config('cortex.bookings.models.service_availability'),
            'event_booking' => config('cortex.bookings.models.event_booking'),
            'event_ticket' => config('cortex.bookings.models.event_ticket'),
            'event' => config('cortex.bookings.models.event'),
        ]);

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

        // Publish resources
        ! $this->app->runningInConsole() || $this->publishResources();
    }
727617
public function boot(Router $router, Dispatcher $event)
    {
        if (config('admin.user.add_default_role_on_register')) {
            $app_user = config('admin.user.namespace');
            $app_user::created(function ($user) {
                if (is_null($user->role_id)) {
                    AdminFacade::model('User')->findOrFail($user->id)
                        ->setRole(config('admin.user.default_role'))
                        ->save();
                }
            });
        }

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

        if (app()->version() >= 5.4) {
            $router->aliasMiddleware('admin.user', AdminMiddleware::class);

            if (config('app.env') == 'testing') {
                $this->loadMigrationsFrom(realpath(__DIR__.'/migrations'));
            }
        } else {
            $router->middleware('admin.user', AdminMiddleware::class);
        }

        $this->registerGates();

        $this->registerViewComposers();

        $event->listen('admin.alerts.collecting', function () {
            $this->addStorageSymlinkAlert();
        });

        $this->bootTranslatorCollectionMacros();
    }
577090
public function boot(Router $router)
    {
        $this->publishes([
            __DIR__.'/Config/charts.php' => config_path('charts.php'),
        ], 'charts_config');

        $this->loadViewsFrom(__DIR__.'/Views', 'charts');

        $this->publishes([
            __DIR__.'/Views' => resource_path('views/vendor/charts'),
        ]);

        if ($this->app->runningInConsole()) {
            $this->commands([
                \ConsoleTVs\Charts\Commands\ChartsCommand::class,
            ]);
        }
    }
45953
public function setRouter(Router $router)
    {
        $this->router = $router;
        $this->router->setContext($this->context);
        $this->context->registerInstance($router);
    }
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);
        });
    }
29489
public function boot()
    {
        parent::boot();
        $router = $this->app->make(Router::class);
        $this->app->make('view')->composer('antares/ban_management::*', BansPlaceholder::class);

        if ($this->app->make(Config::class)->hasCookieTracking()) {
            $router->pushMiddlewareToGroup('web', CookieBanMiddleware::class);
        }

        $router->pushMiddlewareToGroup('web', ThrottleRequestsMiddleware::class);
        $router->pushMiddlewareToGroup('web', FirewallMiddleware::class);
        $router->pushMiddlewareToGroup('web', BannedEmailMiddleware::class);

        $this->extendValidator();
        $this->registerModelsEvents();
        $this->runDDoSProtection();
    }
991832
public function boot(\Illuminate\Routing\Router $router)
    {

        $router->middleware('OnlyCli', 'reg2005\PayAssetsLaravel\Http\Middleware\OnlyCli');

        //require __DIR__ . '/Http/routes.php';
        $this->publishes([
            __DIR__.'/migrations/' => base_path('/database/migrations'),
        ], 'migrations');


    }
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');
    }
621728
public function boot(): void
    {
        $this->registerConsoleCommands();
        $this->registerPublishes();
        $this->registerRoutes();
        $this->registerViews();
        $this->registerFormComponents();
        $this->registerBladeDirectives();
    }
588024
public function bootApiRouting(Router $router)
    {
        if (!$this->app->make('antares.request')->shouldMakeApiResponse()) {
            return;
        }

        $routerAdapter = $this->app->make(Adapter::class);
        $routes        = [];


        /* @var $route \Illuminate\Routing\Route */
        foreach ($router->getRoutes()->getRoutes() as $route) {
            $routeActionName = $route->getActionName();

            if (starts_with($routeActionName, $this->namespace)) {
                $routes[] = $route;
            }
        }


        $routerAdapter->adaptRoutes($routes, $this->namespace);
    }
1056741
public function map(Router $router)
    {
        if ($this->isEnabled()) {
            $router->group($this->routeAttributes(), function() {
                Routes\RouteViewerRoutes::register();
            });
        }
    }
542206
public function boot()
    {
        foreach ($this->app->make('config')->get('tenancy.multi_site.router.patterns', []) as $name => $pattern) {
            Route::pattern($name, $pattern);
        }

        parent::boot();
    }
758343
public function boot()
    {
        $this->setRootControllerNamespace();

        $this->loadRoutes();

        $this->app->booted(function () {
            $this->refreshRoutes($this->app['router']);
        });
    }