feat:安装器 导入数据

This commit is contained in:
atshike
2025-01-03 15:56:13 +08:00
parent ea1f9526c6
commit 118881f16c
@@ -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())