Switch to more recent Laravel route definition methods
This commit is contained in:
parent
62b178ed02
commit
65f27d41a2
9 changed files with 278 additions and 308 deletions
|
@ -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)).+');
|
||||
|
|
Reference in a new issue