コード例 #1
0
ファイル: ConfigureDatabase.php プロジェクト: ruscon/Core
 /**
  * Fire the install script
  * @param  Command $command
  * @return mixed
  */
 public function fire(Command $command)
 {
     $this->command = $command;
     $host = $this->askDatabaseHost();
     $name = $this->askDatabaseName();
     $user = $this->askDatabaseUsername();
     $password = $this->askDatabasePassword();
     $this->setLaravelConfiguration($name, $user, $password, $host);
     $this->env->write($name, $user, $password, $host);
     $command->info('Database successfully configured');
 }
コード例 #2
0
ファイル: ConfigureDatabase.php プロジェクト: SocietyCMS/Core
 /**
  * Fire the install script.
  *
  * @param Command $command
  *
  * @return mixed
  */
 public function fire(Command $command)
 {
     $this->command = $command;
     $connected = false;
     while (!$connected) {
         $host = $this->askDatabaseHost();
         $name = $this->askDatabaseName();
         $user = $this->askDatabaseUsername();
         $password = $this->askDatabasePassword();
         $this->setLaravelConfiguration($name, $user, $password, $host);
         if ($this->databaseConnectionIsValid()) {
             $connected = true;
         } else {
             $command->error('Please ensure your database credentials are valid.');
         }
     }
     $this->env->write($name, $user, $password, $host);
     $command->info('Database successfully configured');
 }
コード例 #3
0
ファイル: ResetEnvironment.php プロジェクト: SocietyCMS/Core
 /**
  * Fire the install script.
  *
  * @param Command $command
  *
  * @throws Exception
  *
  * @return mixed
  */
 public function fire(Command $command)
 {
     $this->env->reset();
 }