Esempio n. 1
0
 /**
  * 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');
 }
Esempio n. 2
0
 /**
  * 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');
 }
Esempio n. 3
0
 /**
  * Fire the install script.
  *
  * @param Command $command
  *
  * @throws Exception
  *
  * @return mixed
  */
 public function fire(Command $command)
 {
     $this->env->reset();
 }