registerTranslations(); } public function boot() { $this->registerViews(); $this->registerWidgets(); // register event service provider for this template $this->app->register(EventProvider::class); $registrator = $this->app->make('displayPipeline'); $registrator->add(AttachPagesToHomepage::class); } /** * Register translations used in this base template */ private function registerTranslations() { // register translations $this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'template'); } /** * Register views used in this template - both visitor's and admin's */ private function registerViews() { // load views $this->loadViewsFrom(array_merge(array_map(function ($path) { return $path; }, \Config::get('view.paths')), [__DIR__ . '/../Resources/views']), 'template'); } /** * Register all widgets related to this template */ private function registerWidgets() { $registrator = $this->app->make('registerWidget'); // register all available widgets $registrator->register(OnePageMenu::class); } }