Bootstrap any application services.

@param \Illuminate\Http\Request $request
@param \Illuminate\Routing\Router $router
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();
        }
    }
960428
public function boot(Router $router)
    {
        if (!$this->app->routesAreCached()) {
            require __DIR__ . '/../routes.php';
        }

        $this->loadMigrationsFrom(__DIR__ . '/../migrations');
        $router->aliasMiddleware('didbot.xml-http-request', \Didbot\DidbotApi\Middleware\XmlHttpRequest::class);
        $router->aliasMiddleware('didbot.throttle', \Didbot\DidbotApi\Middleware\ThrottleRequest::class);

        Passport::routes();


        Validator::extend('iso8601', function ($attribute, $value, $parameters, $validator) {

            return (preg_match('/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/',
                    $value) === 1);
        });

        Validator::extend('uuid', function ($attribute, $value, $parameters, $validator) {

            return (preg_match('/^[a-f\d]{8}-(?:[a-f\d]{4}-){3}[a-f\d]{12}$/i',
                    $value) === 1);

        });

        Validator::extend('geo', function ($attribute, $value, $parameters, $validator) {

            return (preg_match('/^[-+]?([1-8]?\d(\.\d+)?|90(\.0+)?),\s*[-+]?(180(\.0+)?|((1[0-7]\d)|([1-9]?\d))(\.\d+)?)$/',
                    $value) === 1);

        });


        // Custom names for the Polymorphic relation on the Didbot\DidbotApi\Models\Source model
        Relation::morphMap([
            'client' => 'Laravel\Passport\Client',
            'token' => 'Laravel\Passport\Token',
        ]);
    }
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');
        });
	}
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();
    }
512550
protected function setupRouter(Request $request)
    {
        if ($request instanceof Request\Web) {
            $router = $this->getRouter();
            if (
                $router instanceof Router\RouterCuInterface
                && $router->isRequestedUrlClean($request))
            {
                $router->enableCleanUrls();
            }
        }

        return $this;
    }
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');
        });
	}
276136
public function boot()
    {
        parent::boot();

        if (Request::is('*/page/page/*')) {
            Route::bind('page', function ($id) {
                $page = $this->app->make(\Litecms\Page\Interfaces\PageRepositoryInterface::class);
                return $page->findOrNew($id);
            });
        }

    }
199661
public function boot(Router $router)
    {
        $router->middlewareGroup('checkHTTPS', [CheckHTTPS::class]);
        $router->middlewareGroup('forceHTTPS', [ForceHTTPS::class]);
        $this->loadTranslationsFrom(__DIR__.'/resources/lang/', 'LaravelHttps');
    }
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();
    }
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();
    }
468775
public function boot(Router $router)
    {
        /** @var Application $app */
        $app = $this->app;

        $this->commands($this->commands);

        if (!$app->routesAreCached()) {
            $this->loadRoutes($router);
        }

        $this->loadMigrations();

        $this->loadTranslations();

        $this->registerPublishes();
    }
482432
public function addRoute(Route $route) {
        if (!in_array($route, $this->routes)) {
            $this->routes[] = $route;
        }
    }
1298002
public function boot(Router $router)
    {
        if (!$this->app->routesAreCached()) {
            $router->group([
                'namespace' => $this->namespace,
            ], function (Router $router) {
                require __DIR__.'/../routes/web.php';
            });
        }
    }
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);
        });
    }
121834
final public function run(Request $request)
    {
        $this->request = $request;
        $path = $this->request->getUri()->getPath();
        $this->requestedUri = ($path != "/") ? rtrim($path, "/") : "/";
        $this->requestedMethod = strtoupper($this->request->getMethod());
        $this->requestedRepresentation = $this->request->getAccept();
        $this->verifyRequestMethod();
        $route = $this->findRouteFromRequest();
        $this->prepareResponse($route);
    }
928807
public function boot(Router $router)
	{
		$this->setRootControllerNamespace();

		if ($this->app->routesAreCached())
		{
			$this->loadCachedRoutes();
		}
		else
		{
			$this->loadRoutes();
		}
	}
1263165
public function _Bootstrap()
	{
		$this->forward()->setResponse(new HtmlResponse());
		$this->forward()->getCurrentRoute()->setDefault(new Route(array('action'=>'_error')));
	}