Strip FIRST_RUN if database ok

This commit is contained in:
Pig Fang 2019-03-18 16:44:38 +08:00
parent bf364c5f5f
commit d06e17dfdc

View File

@ -21,6 +21,11 @@ class SetupController extends Controller
if ($request->isMethod('get')) {
try {
DB::getPdo();
$content = File::get('..'.DIRECTORY_SEPARATOR.'.env');
$content = str_replace('FIRST_RUN = true', '', $content);
File::put('..'.DIRECTORY_SEPARATOR.'.env', $content);
return redirect('setup/info');
} catch (\Exception $e) {
return view('setup.wizard.database');