feat: add installer, ranks/groups enhancements, and founder protections
This commit is contained in:
@@ -1,9 +1,37 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\InstallerController;
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::view('/', 'app');
|
||||
Route::view('/login', 'app')->name('login');
|
||||
Route::view('/reset-password', 'app')->name('password.reset');
|
||||
Route::get('/install', [InstallerController::class, 'show']);
|
||||
Route::post('/install', [InstallerController::class, 'store'])
|
||||
->withoutMiddleware([VerifyCsrfToken::class]);
|
||||
|
||||
Route::view('/{any}', 'app')->where('any', '^(?!api).*$');
|
||||
Route::get('/', function () {
|
||||
if (!file_exists(base_path('.env'))) {
|
||||
return redirect('/install');
|
||||
}
|
||||
return view('app');
|
||||
});
|
||||
|
||||
Route::get('/login', function () {
|
||||
if (!file_exists(base_path('.env'))) {
|
||||
return redirect('/install');
|
||||
}
|
||||
return view('app');
|
||||
})->name('login');
|
||||
|
||||
Route::get('/reset-password', function () {
|
||||
if (!file_exists(base_path('.env'))) {
|
||||
return redirect('/install');
|
||||
}
|
||||
return view('app');
|
||||
})->name('password.reset');
|
||||
|
||||
Route::get('/{any}', function () {
|
||||
if (!file_exists(base_path('.env'))) {
|
||||
return redirect('/install');
|
||||
}
|
||||
return view('app');
|
||||
})->where('any', '^(?!api).*$');
|
||||
|
||||
Reference in New Issue
Block a user