Esempio n. 1
0
 public function boot()
 {
     // Bring in the routes
     require __DIR__ . '/../routes.php';
     // Add dirs
     View::addLocation(__DIR__ . '/../Views');
     Lang::addNamespace('news', __DIR__ . '/../lang');
     Config::addNamespace('news', __DIR__ . '/../config');
     // Observers
     NewsTranslation::observe(new SlugObserver());
     News::observe(new FileObserver());
 }
Esempio n. 2
0
 public function boot()
 {
     $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'typicms.news');
     $modules = $this->app['config']['typicms']['modules'];
     $this->app['config']->set('typicms.modules', array_merge(['news' => ['linkable_to_page', 'has_feed']], $modules));
     $this->loadViewsFrom(__DIR__ . '/../resources/views/', 'news');
     $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'news');
     $this->publishes([__DIR__ . '/../resources/views' => base_path('resources/views/vendor/news')], 'views');
     $this->publishes([__DIR__ . '/../database' => base_path('database')], 'migrations');
     AliasLoader::getInstance()->alias('News', 'TypiCMS\\Modules\\News\\Facades\\Facade');
     // Observers
     NewsTranslation::observe(new SlugObserver());
     News::observe(new FileObserver());
 }