From bc900d0d2970d08cdeca5b80710120fd335a5e7e Mon Sep 17 00:00:00 2001 From: Julian Prieber <60265788+JulianPrieber@users.noreply.github.com> Date: Fri, 2 Dec 2022 14:35:14 +0100 Subject: [PATCH] Added skip option to installer --- app/Http/Controllers/InstallerController.php | 7 +++++++ resources/views/installer/installer.blade.php | 8 +++++--- routes/web.php | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/InstallerController.php b/app/Http/Controllers/InstallerController.php index 7ea4661..d836dd9 100644 --- a/app/Http/Controllers/InstallerController.php +++ b/app/Http/Controllers/InstallerController.php @@ -140,4 +140,11 @@ class InstallerController extends Controller return redirect(url('')); } + public function skip() + { + if(file_exists(base_path("INSTALLING"))){unlink(base_path("INSTALLING"));} + + return redirect(url('')); + } + } diff --git a/resources/views/installer/installer.blade.php b/resources/views/installer/installer.blade.php index 9488545..3aa7aa0 100644 --- a/resources/views/installer/installer.blade.php +++ b/resources/views/installer/installer.blade.php @@ -19,10 +19,12 @@ 2. Setup the database
3. Create the admin user
4. Configure the app
-

-
+

+ @if(!DB::table('users')->get()->isEmpty()) + An existing installation has been detected.
You may skip the installation process.
+    + @endif    - @endif diff --git a/routes/web.php b/routes/web.php index 6c37b12..c2f2d88 100755 --- a/routes/web.php +++ b/routes/web.php @@ -38,6 +38,7 @@ if(file_exists(base_path('INSTALLING'))){ Route::post('/mysql', [InstallerController::class, 'mysql'])->name('mysql'); Route::post('/options', [InstallerController::class, 'options'])->name('options'); Route::get('/mysql-test', [InstallerController::class, 'mysqlTest'])->name('mysqlTest'); + Route::get('/skip', [InstallerController::class, 'skip'])->name('skip'); }else{