コード例 #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());
 }
コード例 #2
0
ファイル: ModuleProvider.php プロジェクト: typicms/events
 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());
 }