Bootstrap the application services.

@param \Illuminate\Routing\Router $router
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();
    }
442518
public function boot()
    {
        $router = $this->app['router'];

        $router->middlewareGroup('soda.web', [Drafting::class]);
        $router->middlewareGroup('soda.api', [Drafting::class]);

        $router->pushMiddlewareToGroup('web', TransferSession::class);
        $router->pushMiddlewareToGroup('web', DraftAlert::class);
        $router->pushMiddlewareToGroup('web', ToggleLocale::class);
        if (config('soda.cms.https')) {
            $router->pushMiddlewareToGroup('soda.web', ForceHttps::class);
        }

        $router->aliasMiddleware('soda.auth', Authenticate::class);
        $router->aliasMiddleware('soda.guest', RedirectIfAuthenticated::class);

        $router->aliasMiddleware('soda.role', HasRole::class);
        $router->aliasMiddleware('soda.permission', HasPermission::class);
        $router->aliasMiddleware('soda.ability', HasAbility::class);

        $middlewareGroups = $router->getMiddlewareGroups();

        if (isset($middlewareGroups['web'])) {
            if (($key = array_search('Illuminate\Session\Middleware\StartSession', $middlewareGroups['web'])) !== false) {
                $middlewareGroups['web'][$key] = SluggableSession::class;
                array_unshift($router->middlewarePriority, SluggableSession::class);
            }

            $router->middlewareGroup('soda.sluggable-web', $middlewareGroups['web']);
        }

        parent::boot();
    }
346578
public function boot(Router $router): void
    {
        // Bind route models and constrains
        $router->pattern('category', '[a-zA-Z0-9-]+');
        $router->model('category', config('rinvex.categories.models.category'));

        // Map relations
        Relation::morphMap([
            'category' => config('rinvex.categories.models.category'),
        ]);

        // Load resources
        require __DIR__.'/../../routes/breadcrumbs/adminarea.php';
        $this->loadRoutesFrom(__DIR__.'/../../routes/web/adminarea.php');
        $this->loadViewsFrom(__DIR__.'/../../resources/views', 'cortex/categories');
        $this->loadTranslationsFrom(__DIR__.'/../../resources/lang', 'cortex/categories');
        ! $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();
    }
868352
public function boot()
    {
        $router = $this->app->make(Router::class);
        $events = $this->app->make(Dispatcher::class);
        $kernel = $this->app->make(Kernel::class);

        $this->setExtensionPath();

        $this->registerEventListeners($events);
        $this->registerRouteMiddleware($router, $kernel);
        $this->bootConfiguration();
        $this->bootMemory();
        $this->bootExtensionComponents();
        $this->bootExtensionRouting();
        $this->bootApiRouting($router);
        $this->loadMenuFile();
        $this->loadBreadcrumbsFile();
    }
187756
public function boot(\Illuminate\Routing\Router $router)
    {
        $this->load();

        $this->loadCommands();

        // Middlewares
        $router->aliasMiddleware('lang', \Revys\Revy\App\Http\Middleware\LanguageMiddleware::class);

        $this->initProviders();
    }
1328764
protected function buildRoutesForAuth(Router $router)
    {
        $auth = $this->core->auth();

        $router->group(
            [
                'prefix' => 'auth',
            ],
            function (Router $router) use ($auth) {

                $router->{$this->getLoginMethod()}($this->getLoginPath(), $auth->getApiRouteLoginAction());
                $router->{$this->getLogoutMethod()}($this->getLogoutPath(), $auth->getApiRouteLogoutAction());
            }
        );
    }
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');


    }
351748
public function boot(Request $request, Router $router)
    {
        $config = $this->app['config']['terminal'];
        if (in_array($request->getClientIp(), Arr::get($config, 'whitelists', [])) === true || Arr::get($config, 'enabled') === true) {
            $this->loadViewsFrom(__DIR__.'/../resources/views', 'terminal');
            $this->handleRoutes($router, $config);
        }

        if ($this->app->runningInConsole() === true) {
            $this->handlePublishes();
        }
    }
143766
public function boot(Router $router)
    {
        // Tell Laravel where the views for a given namespace are located.
        $this->loadViewsFrom(base_path('vendor/aginev/acl/src/resources/views'), 'acl');

        $this->publishes([
            base_path('vendor/aginev/acl/src/resources/views') => base_path('resources/views/vendor/acl'),
        ], 'views');

        // Publish assets
        $this->publishes([
            base_path('vendor/aginev/acl/src/public') => public_path('vendor/acl'),
        ], 'public');

        // Tell Laravel where the translations for a given namespace are located.
        $this->loadTranslationsFrom(base_path('vendor/aginev/acl/src/resources/lang'), 'acl');

        $this->publishes([
            base_path('vendor/aginev/acl/src/resources/lang') => base_path('resources/lang/vendor/acl'),
        ], 'lang');

        // Merge config
        $this->mergeConfigFrom(base_path('vendor/aginev/acl/src/config/acl.php'), 'acl');

        $this->publishes([
            base_path('vendor/aginev/acl/src/config/acl.php') => config_path('acl.php'),
        ], 'config');

        // Publish migrations
        $this->publishes([
            base_path('vendor/aginev/acl/src/Database/Migrations/') => base_path('/database/migrations')
        ], 'migrations');

        // Publish seeds
        $this->publishes([
            base_path('vendor/aginev/acl/src/Database/Seeds/') => base_path('/database/seeds')
        ], 'seeds');

        // Define the ACL route middleware
        $router->middleware('acl', 'Aginev\Acl\Http\Middleware\Acl');

        /**
         * Including A Routes File From A Service Provider
         * NB! Keep this line at the very end of the method to be able to use the config at routes.php
         */
        include base_path('vendor/aginev/acl/src/Http/routes.php');
    }
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);
    }
550500
public function boot()
    {
        $router = $this->app->make(Router::class);
        $path   = realpath(__DIR__ . '/../../');
        $this->addConfigComponent('antares/foundation', 'antares/foundation', $path . '/resources/config');
        $this->addLanguageComponent('antares/foundation', 'antares/foundation', $path . '/resources/lang');
        $this->assignAreaTemplate();


        $this->appendWidgetsDefaultConfig();
        if (!$this->app->routesAreCached()) {
            require "{$path}/src/routes.php";
        }

        $router->aliasMiddleware('antares.forms', FormMiddleware::class);
        $router->aliasMiddleware('antares.ui-components', UIComponentsMiddleware::class);
        $this->runtime();


        $this->app->make('events')->fire('antares.ready');
        $this->app->make('events')->fire(new AntaresReady());
        $this->app->make('view')->composer(['antares/foundation::account.index', 'antares/logger::admin.devices.*'], \Antares\Users\Http\Handlers\AccountPlaceholder::class);

        if ($this->app->bound('antares.watchdog')) {
            $this->app->make('events')->subscribe(AfterExtensionOperation::class);
        }

        $this->app->make('view')->composer('antares/foundation::breadcrumbs.bootstrap3', function($view) {
            view()->share('breadcrumbs_data', array_get($view->getData(), 'breadcrumbs', []));
        });

        $this->app->make('events')->listen(LoadServiceProviders::class, function() {
            $widgets = $this->app->make('antares.ui-components.finder')->detectRoutes();

            $widgets->each(function($widget) {
                if (class_exists($widget)) {
                    $widget::routes();
                }
            });
        });
        $this->app->bind('languages', function($app) {
            return new Languages($app);
        });
    }
341494
public function boot()
    {
        $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');

        $this->app->bind(DbRedirectorRouter::class, function () {
            $router = new Router($this->app['events']);

            return new DbRedirectorRouter($router);
        });
    }
1185404
public function boot(Router $router): void
    {
        // Attach request macro
        $this->attachRequestMacro();

        // Map bouncer models
        Bouncer::useRoleModel(config('cortex.auth.models.role'));
        Bouncer::useAbilityModel(config('cortex.auth.models.ability'));

        // Map bouncer tables (users, roles, abilities tables are set through their models)
        Bouncer::tables([
            'permissions' => config('cortex.auth.tables.permissions'),
            'assigned_roles' => config('cortex.auth.tables.assigned_roles'),
        ]);

        // Bind route models and constrains
        $router->pattern('role', '[a-zA-Z0-9-]+');
        $router->pattern('ability', '[a-zA-Z0-9-]+');
        $router->pattern('session', '[a-zA-Z0-9-]+');
        $router->pattern('admin', '[a-zA-Z0-9-]+');
        $router->pattern('member', '[a-zA-Z0-9-]+');
        $router->pattern('manager', '[a-zA-Z0-9-]+');
        $router->model('role', config('cortex.auth.models.role'));
        $router->model('admin', config('cortex.auth.models.admin'));
        $router->model('member', config('cortex.auth.models.member'));
        $router->model('manager', config('cortex.auth.models.manager'));
        $router->model('guardian', config('cortex.auth.models.guardian'));
        $router->model('ability', config('cortex.auth.models.ability'));
        $router->model('session', config('cortex.auth.models.session'));

        // Map relations
        Relation::morphMap([
            'role' => config('cortex.auth.models.role'),
            'admin' => config('cortex.auth.models.admin'),
            'member' => config('cortex.auth.models.member'),
            'manager' => config('cortex.auth.models.manager'),
            'guardian' => config('cortex.auth.models.guardian'),
            'ability' => config('cortex.auth.models.ability'),
        ]);

        // Load resources
        require __DIR__.'/../../routes/breadcrumbs/adminarea.php';
        $this->loadRoutesFrom(__DIR__.'/../../routes/web/adminarea.php');
        $this->loadViewsFrom(__DIR__.'/../../resources/views', 'cortex/auth');
        $this->loadTranslationsFrom(__DIR__.'/../../resources/lang', 'cortex/auth');
        ! $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();

        // Register event handlers
        $this->app['events']->subscribe(GenericHandler::class);

        // Register attributes entities
        ! app()->bound('rinvex.attributes.entities') || app('rinvex.attributes.entities')->push('admin');
        ! app()->bound('rinvex.attributes.entities') || app('rinvex.attributes.entities')->push('member');
        ! app()->bound('rinvex.attributes.entities') || app('rinvex.attributes.entities')->push('manager');

        // Override middlware
        $this->overrideMiddleware($router);

        // Register menus
        $this->registerMenus();

        // Share current user instance with all views
        $this->app['view']->composer('*', function ($view) {
            ! config('rinvex.tenants.active') || $view->with('currentTenant', config('rinvex.tenants.active'));
            $view->with('currentUser', auth()->guard(request()->route('guard'))->user());
        });
    }
1153353
public function boot(Router $router)
	{
        $viewPath = __DIR__.'/../resources/views';
        $this->loadViewsFrom($viewPath, 'translation-manager');
        $this->publishes([
            $viewPath => base_path('resources/views/vendor/translation-manager'),
        ], 'views');

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

        $config = $this->app['config']->get('translation-manager.route', []);
        $config['namespace'] = 'Barryvdh\TranslationManager';

        $router->group($config, function($router)
        {
            $router->get('view/{groupKey?}', 'Controller@getView')->where('groupKey', '.*');
            $router->get('/{groupKey?}', 'Controller@getIndex')->where('groupKey', '.*');
            $router->post('/add/{groupKey}', 'Controller@postAdd')->where('groupKey', '.*');
            $router->post('/edit/{groupKey}', 'Controller@postEdit')->where('groupKey', '.*');
            $router->post('/groups/add', 'Controller@postAddGroup');
            $router->post('/delete/{groupKey}/{translationKey}', 'Controller@postDelete')->where('groupKey', '.*');
            $router->post('/import', 'Controller@postImport');
            $router->post('/find', 'Controller@postFind');
            $router->post('/locales/add', 'Controller@postAddLocale');
            $router->post('/locales/remove', 'Controller@postRemoveLocale');
            $router->post('/publish/{groupKey}', 'Controller@postPublish')->where('groupKey', '.*');
            $router->post('/translate-missing', 'Controller@postTranslateMissing');
        });
	}
975502
public function boot(Router $router)
    {
        $this->publishConfigs();
        $this->bootViews();
        $this->bootAssets();
        $this->bootCommands();
        $this->publishDatabaseFiles();
        $this->registerMorphmaps();
        $this->registerBladeExtensions();
    }
402663
public function boot(Router $router, Kernel $kernel)
    {
        // add router middleware
        $globalMiddleware = [
            UploadChecks::class
        ];
        $routerMiddleware = [
            'coaster.admin' => AdminAuth::class,
            'coaster.guest' => GuestAuth::class,
            'coaster.secure_upload' => SecureUpload::class,
        ];
        event(new LoadMiddleware($globalMiddleware, $routerMiddleware));
        foreach ($globalMiddleware as $globalMiddlewareClass) {
            $kernel->pushMiddleware($globalMiddlewareClass);
        }
        foreach ($routerMiddleware as $routerMiddlewareName => $routerMiddlewareClass) {
            $router->middlewareGroup($routerMiddlewareName, [$routerMiddlewareClass]);
        }

        // use coater guard and user provider
        $authGuard = Helpers\Cms\CoasterGuard::class;
        $authUserProvider = Providers\CoasterAuthUserProvider::class;
        event(new LoadAuth($authGuard, $authUserProvider));
        if ($authGuard && $authUserProvider) {
            Auth::extend('coaster', function ($app) use ($authGuard, $authUserProvider) {
                $guard = new $authGuard(
                    'coasterguard',
                    new $authUserProvider($app['hash'], config('auth.providers.users.model')),
                    $app['session.store'],
                    $app['request']
                );

                // set cookie jar for cookies
                if (method_exists($guard, 'setCookieJar')) {
                    $guard->setCookieJar($this->app['cookie']);
                }
                if (method_exists($guard, 'setDispatcher')) {
                    $guard->setDispatcher($this->app['events']);
                }
                if (method_exists($guard, 'setRequest')) {
                    $guard->setRequest($this->app->refresh('request', $guard, 'setRequest'));
                }

                return $guard;
            });
        }

        // load coaster views
        $adminViews = [
            base_path(trim(config('coaster::admin.view'), '/'))
        ];
        $frontendViews = [
            base_path(trim(config('coaster::frontend.view'), '/'))
        ];
        event(new SetViewPaths($adminViews, $frontendViews));
        $this->loadViewsFrom($adminViews, 'coaster');
        $this->loadViewsFrom($frontendViews, 'coasterCms');

        $this->app->singleton('formMessage', function () {
            return new FormMessage($this->app['session'], 'default', config('coaster::frontend.form_error_class'));
        });
    }
379809
public function boot()
    {
    	// the main router
        $this->loadRoutesFrom( __DIR__.'/Routes/backend_lts_route.php');
        $this->loadRoutesFrom( __DIR__.'/Routes/frontend_lts_route.php');
	    // the main views folder
	    $this->loadViewsFrom(__DIR__ . '/Views', 'laravel_tagable');
	    // 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_tagable'),
	    ]);

	    $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_tagable'),
	    ], 'public');

	    // for publish the sms_ir config file to the main app config folder
	    $this->publishes([
		    __DIR__ . '/Config/LTS.php' => config_path('laravel_tagable.php'),
	    ]);
        $this->publishes([
            __DIR__ . '/Traits/LaraveTagablesSystem.php' => app_path('Traits/LaraveTagablesSystem.php'),
        ]);
        $this->publishes([
            __DIR__ . '/Components' => resource_path('assets/js/components/laravel_tagable'),
        ]);
    }