/**
  * Bootstrap the given application.
  *
  * @param  \Illuminate\Contracts\Foundation\Application  $app
  * @return void
  */
 public function bootstrap(Application $app)
 {
     parent::bootstrap($app);
     $app['config']->push('app.providers', \Inoplate\Captcha\CaptchaServiceProvider::class);
     $app['config']->push('app.providers', \Inoplate\Foundation\Providers\InoplateServiceProvider::class);
     $app['config']->push('app.providers', \Inoplate\Account\Providers\AccountServiceProvider::class);
     $app['config']->set('app.aliases.Captcha', \Inoplate\Captcha\Facades\Captcha::class);
     $app['config']->set('captcha.challenge', 'image');
     $app['config']->set('inoplate.account.allow_register', true);
     $app['config']->set('inoplate.account.enable_captcha', false);
 }
 /**
  * Perform post-registration booting of services.
  *
  * @return void
  */
 public function boot()
 {
     $installed_modules = \Illuminato\Module::getInstalledModules();
     foreach ($installed_modules as $key => $module) {
         $module_dir = _PS_MODULE_DIR_ . $module['name'];
         if (\Module::isEnabled($module['name'])) {
             if (is_dir($module_dir . '/resources/views')) {
                 $this->loadViewsFrom($module_dir . '/resources/views', $module['namespace']);
             }
             if (is_dir($module_dir . '/resources/lang')) {
                 $this->loadTranslationsFrom($module_dir . '/resources/lang', $module['namespace']);
             }
             if (is_dir($module_dir . '/config')) {
                 $this->loadConfigsFrom($module_dir . '.config', $module['namespace']);
             }
         }
     }
     //Now we can load the module's config files
     $configLoader = new LoadConfiguration();
     $configLoader->loadModuleConfigurationFiles(app());
 }