Skip to content

Commit 995ff89

Browse files
committed
Skipping installer when instaled for docker
1 parent 4adf239 commit 995ff89

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

resources/views/installer/installer.blade.php

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@
66

77
@if($_SERVER['QUERY_STRING'] === '')
88
{{-- Landing page --}}
9-
9+
10+
@if(!DB::table('users')->get()->isEmpty())
11+
@php
12+
if(file_exists(base_path("INSTALLING"))){unlink(base_path("INSTALLING"));}
13+
header("Refresh:0");
14+
@endphp
15+
@else
1016
<div class="logo-container fadein">
1117
<img class="logo-img" src="{{ asset('littlelink/images/logo.svg') }}" alt="Logo">
1218
</div>
@@ -19,10 +25,9 @@
1925
2. Setup the database<br>
2026
3. Create the admin user<br>
2127
4. Configure the app<br>
22-
</div></p>
23-
<div class="row">
28+
</div></p>
2429
&ensp;<a class="btn" href="{{url('?2')}}"><button>Next</button></a>&ensp;
25-
</div>
30+
@endif
2631

2732
@endif
2833

routes/web.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@
3939
Route::post('/options', [InstallerController::class, 'options'])->name('options');
4040
Route::get('/mysql-test', [InstallerController::class, 'mysqlTest'])->name('mysqlTest');
4141

42+
Route::get('{any}', function() {
43+
if(!DB::table('users')->get()->isEmpty()){
44+
if(file_exists(base_path("INSTALLING"))){unlink(base_path("INSTALLING"));header("Refresh:0");}
45+
} else {
46+
return redirect(url(''));
47+
}
48+
})->where('any', '.*');
49+
4250
}else{
4351

4452
// Disables routes if in Maintenance Mode
@@ -101,7 +109,6 @@
101109
Route::get('/studio/theme', [UserController::class, 'showTheme'])->name('showTheme');
102110
Route::post('/studio/theme', [UserController::class, 'editTheme'])->name('editTheme');
103111
Route::get('/deleteLink/{id}', [UserController::class, 'deleteLink'])->name('deleteLink');
104-
Route::get('/clearIcon/{id}', [UserController::class, 'clearIcon'])->name('clearIcon');
105112
Route::get('/upLink/{up}/{id}', [UserController::class, 'upLink'])->name('upLink');
106113
Route::post('/studio/edit-link/{id}', [UserController::class, 'editLink'])->name('editLink');
107114
Route::get('/studio/button-editor/{id}', [UserController::class, 'showCSS'])->name('showCSS');
@@ -146,8 +153,6 @@
146153
Route::post('/panel/env', [AdminController::class, 'editENV'])->name('editENV');
147154
Route::get('/panel/site', [AdminController::class, 'showSite'])->name('showSite');
148155
Route::post('/panel/site', [AdminController::class, 'editSite'])->name('editSite');
149-
Route::get('/panel/site/delavatar', [AdminController::class, 'delAvatar'])->name('delAvatar');
150-
Route::get('/panel/site/delfavicon', [AdminController::class, 'delFavicon'])->name('delFavicon');
151156
Route::get('/panel/phpinfo', [AdminController::class, 'phpinfo'])->name('phpinfo');
152157
Route::get('/panel/backups', [AdminController::class, 'showBackups'])->name('showBackups');
153158
Route::post('/panel/theme', [AdminController::class, 'deleteTheme'])->name('deleteTheme');

0 commit comments

Comments
 (0)