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