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