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