38 lines
999 B
PHP
38 lines
999 B
PHP
<?php
|
|
|
|
use App\Http\Controllers\InstallerController;
|
|
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
Route::get('/install', [InstallerController::class, 'show']);
|
|
Route::post('/install', [InstallerController::class, 'store'])
|
|
->withoutMiddleware([VerifyCsrfToken::class]);
|
|
|
|
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).*$');
|