/**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     $manager = new TemplateManager($this->app['files'], $this->app['boomcms.repositories.template']);
     $this->app->singleton('boomcms.template.manager', function ($app) use($manager) {
         return $manager;
     });
     $this->themes = $manager->findInstalledThemes();
     foreach ($this->themes as $theme) {
         Config::merge($theme->getConfigDirectory() . DIRECTORY_SEPARATOR . 'boomcms.php');
     }
     foreach ($this->themes as $theme) {
         $views = $theme->getViewDirectory();
         $authViews = $views . DIRECTORY_SEPARATOR . 'auth';
         $public = $theme->getPublicDirectory();
         $init = $theme->getDirectory() . DIRECTORY_SEPARATOR . 'init.php';
         $migrations = $theme->getDirectory() . '/migrations/';
         $this->loadViewsFrom($views, $theme->getName());
         $this->loadViewsFrom($views . '/chunks', 'boomcms.chunks');
         if (file_exists($authViews)) {
             $this->publishes([$authViews => base_path('resources/views/auth')], 'boomcms');
         }
         if (file_exists($public)) {
             $this->publishes([$public => public_path('vendor/boomcms/themes/' . $theme)], $theme->getName());
         }
         if (file_exists($migrations)) {
             $this->publishes([$migrations => base_path('/migrations/boomcms')], $theme->getName());
         }
         if (file_exists($init)) {
             include $init;
         }
     }
 }
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     $manager = new TemplateManager($this->app['files'], $this->app[Template::class], $this->app['cache.store']);
     $this->app->singleton('boomcms.template.manager', function () use($manager) {
         return $manager;
     });
     $this->themes = $manager->getInstalledThemes();
     foreach ($this->themes as $theme) {
         Config::merge($theme->getConfigDirectory() . DIRECTORY_SEPARATOR . 'boomcms.php');
     }
     foreach ($this->themes as $theme) {
         $views = $theme->getViewDirectory();
         $init = $theme->getDirectory() . DIRECTORY_SEPARATOR . 'init.php';
         $this->loadViewsFrom($views, $theme->getName());
         $this->loadViewsFrom($views . '/boomcms', 'boomcms');
         $this->loadViewsFrom($views . '/chunks', 'boomcms.chunks');
         if (file_exists($init)) {
             include $init;
         }
     }
 }
 /**
  * Bootstrap any application services.
  *
  * @return void
  */
 public function boot()
 {
     $this->themes = $this->manager->findInstalledThemes();
     foreach ($this->themes as $theme) {
         Config::merge($theme->getConfigDirectory() . DIRECTORY_SEPARATOR . 'boomcms.php');
     }
     foreach ($this->themes as $theme) {
         $views = $theme->getViewDirectory();
         $public = $theme->getPublicDirectory();
         $init = $theme->getDirectory() . DIRECTORY_SEPARATOR . 'init.php';
         $migrations = $theme->getDirectory() . '/migrations/';
         $this->loadViewsFrom($views, $theme->getName());
         $this->loadViewsFrom($views . '/chunks', 'boomcms.chunks');
         if (file_exists($public)) {
             $this->publishes([$public => public_path('vendor/boomcms/themes/' . $theme)], $theme->getName());
         }
         if (file_exists($migrations)) {
             $this->publishes([$migrations => base_path('/migrations/boomcms')], $theme->getName());
         }
         if (file_exists($init)) {
             include $init;
         }
     }
 }