Skip to content

Commit bc900d0

Browse files
committed
Added skip option to installer
1 parent 7a07b49 commit bc900d0

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

app/Http/Controllers/InstallerController.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,11 @@ public function options(request $request)
140140
return redirect(url(''));
141141
}
142142

143+
public function skip()
144+
{
145+
if(file_exists(base_path("INSTALLING"))){unlink(base_path("INSTALLING"));}
146+
147+
return redirect(url(''));
148+
}
149+
143150
}

resources/views/installer/installer.blade.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@
1919
2. Setup the database<br>
2020
3. Create the admin user<br>
2121
4. Configure the app<br>
22-
</div></p>
23-
<div class="row">
22+
</div></p>
23+
@if(!DB::table('users')->get()->isEmpty())
24+
<span>An existing installation has been detected.<br>You may skip the installation process.</span>
25+
&ensp;<a style="margin-bottom:-20px;" class="btn" href="{{url('skip')}}"><button>Skip</button></a>&ensp;
26+
@endif
2427
&ensp;<a class="btn" href="{{url('?2')}}"><button>Next</button></a>&ensp;
25-
</div>
2628

2729
@endif
2830

routes/web.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
Route::post('/mysql', [InstallerController::class, 'mysql'])->name('mysql');
3939
Route::post('/options', [InstallerController::class, 'options'])->name('options');
4040
Route::get('/mysql-test', [InstallerController::class, 'mysqlTest'])->name('mysqlTest');
41+
Route::get('/skip', [InstallerController::class, 'skip'])->name('skip');
4142

4243
}else{
4344

0 commit comments

Comments
 (0)