Switch to more recent Laravel route definition methods

This commit is contained in:
DaneEveritt 2022-05-14 15:51:05 -04:00
parent 62b178ed02
commit 65f27d41a2
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
9 changed files with 278 additions and 308 deletions

View file

@ -1,15 +1,16 @@
<?php
use Pterodactyl\Http\Controllers\Base;
use Pterodactyl\Http\Middleware\RequireTwoFactorAuthentication;
Route::get('/', 'IndexController@index')->name('index')->fallback();
Route::get('/account', 'IndexController@index')
Route::get('/', [Base\IndexController::class, 'index'])->name('index')->fallback();
Route::get('/account', [Base\IndexController::class, 'index'])
->withoutMiddleware(RequireTwoFactorAuthentication::class)
->name('account');
Route::get('/locales/{locale}/{namespace}.json', 'LocaleController')
->withoutMiddleware(RequireTwoFactorAuthentication::class)
Route::get('/locales/{locale}/{namespace}.json', Base\LocaleController::class)
->withoutMiddleware(['auth', RequireTwoFactorAuthentication::class])
->where('namespace', '.*');
Route::get('/{react}', 'IndexController@index')
Route::get('/{react}', [Base\IndexController::class, 'index'])
->where('react', '^(?!(\/)?(api|auth|admin|daemon)).+');