Beispiel #1
0
 public function boot()
 {
     $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'typicms.users');
     $modules = $this->app['config']['typicms']['modules'];
     $this->app['config']->set('typicms.modules', array_merge(['users' => []], $modules));
     $this->loadViewsFrom(__DIR__ . '/../resources/views/', 'users');
     $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'users');
     $this->publishes([__DIR__ . '/../resources/views' => base_path('resources/views/vendor/users')], 'views');
     $this->publishes([__DIR__ . '/../database' => base_path('database')], 'migrations');
     AliasLoader::getInstance()->alias('Users', 'TypiCMS\\Modules\\Users\\Facades\\Facade');
     // Observers
     User::observe(new FileObserver());
 }
Beispiel #2
0
 public function boot()
 {
     // Bring in the routes
     require __DIR__ . '/../routes.php';
     // Add dirs
     View::addLocation(__DIR__ . '/../Views');
     Lang::addNamespace('users', __DIR__ . '/../lang');
     Config::addNamespace('users', __DIR__ . '/../config');
     // Add user preferences to Config
     $prefs = App::make('TypiCMS\\Modules\\Users\\Repositories\\UserInterface')->getPreferences();
     Config::set('current_user', $prefs);
     // Observers
     User::observe(new FileObserver());
 }