private function getDatabaseInformation()
{
$this->header('Database details');
$connectionVerified = false;
$database = [];
while (!$connectionVerified) {
// Should we just skip this step if only one driver is available?
$type = $this->choice('Type', $this->getDatabaseDrivers(), 0);
$database['type'] = $type;
Config::set('database.default', $type);
if ($type !== 'sqlite') {
$host = $this->ask('Host', 'localhost');
$name = $this->ask('Name', 'deployer');
$user = $this->ask('Username', 'deployer');
$pass = $this->secret('Password');
$database['host'] = $host;
$database['database'] = $name;
$database['username'] = $user;
$database['password'] = $pass;
Config::set('database.connections.' . $type . '.host', $host);
Config::set('database.connections.' . $type . '.database', $name);
Config::set('database.connections.' . $type . '.username', $user);
Config::set('database.connections.' . $type . '.password', $pass);
}
$connectionVerified = $this->verifyDatabaseDetails($database);
}
return $database;
}