优化install
This commit is contained in:
parent
8d10baa35f
commit
56f6ba90a6
@ -160,25 +160,26 @@ class InstallProjectCommand extends Command
|
|||||||
if (!$this->databaseLink) {
|
if (!$this->databaseLink) {
|
||||||
unlink($this->getEnvFilePath());
|
unlink($this->getEnvFilePath());
|
||||||
$this->execute($this->input, $this->output);
|
$this->execute($this->input, $this->output);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
[
|
||||||
|
$connections['mysql']['hostname'],
|
||||||
|
$connections['mysql']['database'],
|
||||||
|
$connections['mysql']['username'],
|
||||||
|
$connections['mysql']['password'],
|
||||||
|
$connections['mysql']['hostport'],
|
||||||
|
$connections['mysql']['charset'],
|
||||||
|
$connections['mysql']['prefix'],
|
||||||
|
] = $this->databaseLink ?: [
|
||||||
|
env('mysql.hostname')
|
||||||
|
];
|
||||||
|
|
||||||
|
\config([
|
||||||
|
'connections' => $connections,
|
||||||
|
], 'database');
|
||||||
|
|
||||||
|
$this->migrateAndSeeds();
|
||||||
}
|
}
|
||||||
|
|
||||||
[
|
|
||||||
$connections['mysql']['hostname'],
|
|
||||||
$connections['mysql']['database'],
|
|
||||||
$connections['mysql']['username'],
|
|
||||||
$connections['mysql']['password'],
|
|
||||||
$connections['mysql']['hostport'],
|
|
||||||
$connections['mysql']['charset'],
|
|
||||||
$connections['mysql']['prefix'],
|
|
||||||
] = $this->databaseLink ? : [
|
|
||||||
env('mysql.hostname')
|
|
||||||
];
|
|
||||||
|
|
||||||
\config([
|
|
||||||
'connections' => $connections,
|
|
||||||
], 'database');
|
|
||||||
|
|
||||||
$this->migrateAndSeeds();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user