feat:安装器 导入数据
This commit is contained in:
@@ -119,8 +119,6 @@ class IndexController extends Controller
|
||||
}
|
||||
|
||||
try {
|
||||
exec('cp .env.example .env');
|
||||
|
||||
$this->updateEnv('DB_HOST', $params['host']);
|
||||
$this->updateEnv('DB_PORT', $params['port']);
|
||||
$this->updateEnv('DB_DATABASE', $params['name']);
|
||||
@@ -144,6 +142,8 @@ class IndexController extends Controller
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
Artisan::call('cache:clear');
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return redirect('install?step='.$step - 1)
|
||||
->withErrors('sql_error:'.$e->getMessage())
|
||||
|
||||
Reference in New Issue
Block a user