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