/**
  * Execute the console command.
  *
  * @return void
  */
 public function handle()
 {
     parent::fire();
     try {
         if (cmsinstalled()) {
             throw new \Exception('The CMS is already installed!');
         }
         $success = $this->r_installer->testDBConnection($this->argument('db-host'), $this->argument('db-name'), $this->argument('db-username'), $this->argument('db-password'));
         if ($success) {
             $this->r_installer->generateConfigs($this->argument('site-name'), $this->argument('site-description'), $this->argument('site-url'), $this->argument('db-host'), $this->argument('db-name'), $this->argument('db-username'), $this->argument('db-password'), $this->argument('user-first-name'), $this->argument('user-last-name'), $this->argument('user-email'));
             $this->call('cache:clear');
             $this->r_installer->migrate(['APP_SITE_NAME' => $this->argument('site-name'), 'APP_URL' => $this->argument('site-url')], ['--force' => true, '--database' => 'installer'], ['--force' => true, '--database' => 'installer']);
             $password = Str::random(Settings::get('installer.password_length'));
             $this->r_installer->addUserAdmin(['civility' => $this->argument('user-civility'), 'first_name' => $this->argument('user-first-name'), 'last_name' => $this->argument('user-last-name'), 'email' => $this->argument('user-email'), 'password' => $password]);
             $this->r_installer->set_env_as_production();
             $this->line(sprintf(trans('installer::installer.command_line_show_password'), $this->argument('user-email'), $password));
             $this->line(trans('installer::installer.command_line_remember_change_password'));
         } else {
             $this->error(trans('installer::installer.error:db_connection'));
         }
     } catch (InvalidArgumentException $e) {
         $this->error($e->getMessage());
     } catch (\Exception $e) {
         $this->error($e->getMessage());
     }
 }
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function handle()
 {
     parent::fire();
     try {
         if (!cmsinstalled()) {
             throw new \Exception('The CMS is not installed!');
         }
         $password = Str::random(8);
         $this->r_installer->addUserAdmin(['civility' => $this->argument('user-civility'), 'first_name' => $this->argument('user-first-name'), 'last_name' => $this->argument('user-last-name'), 'email' => $this->argument('user-email'), 'password' => $password]);
         $this->line('<comment>Password associated to ' . $this->argument('user-email') . ' : ' . $password . '</comment>');
         $this->line('<comment>Do not forget to change this password after your first connection!</comment>');
     } catch (InvalidArgumentException $e) {
         $this->error($e->getMessage());
     } catch (\Exception $e) {
         $this->error($e->getMessage());
     }
 }
 /**
  * Execute the console command.
  *
  * @return void
  */
 public function handle()
 {
     parent::fire();
     $this->r_installer->consoleInstallationProcess($this->getOutput(), $this->argument('db-host'), $this->argument('db-name'), $this->argument('db-username'), $this->argument('db-password'), $this->argument('site-name'), $this->argument('site-description'), $this->argument('site-url'), $this->argument('user-civility'), $this->argument('user-first-name'), $this->argument('user-last-name'), $this->argument('user-email'));
 }