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