Set the default connection name.
public setConnection ( string $name ) : void | ||
$name | string | |
리턴 | void |
protected function prepareDatabase() { $this->mapper->setConnection($this->option('database')); if (!$this->mapper->repositoryExists()) { $options = ['--database' => $this->option('database')]; $this->call('mapping:install', $options); } }