%PDF- %PDF-
Direktori : /mnt/tnb2/git/loslex/routes/ |
Current File : //mnt/tnb2/git/loslex/routes/web.php |
<?php use Illuminate\Support\Facades\Route; use App\Http\Controllers\RangeController; use App\Http\Controllers\LocaleController; use App\Http\Controllers\ContestController; use App\Http\Controllers\ProfileController; use App\Http\Controllers\RegistrationController; use App\Http\Controllers\OrganizerGroupController; use App\Http\Controllers\OrganizerGroupUserController; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider and all of them will | be assigned to the "web" middleware group. Make something great! | */ Route::get('lang/{lang}', [LocaleController::class, 'switchLang'])->name('lang.switch'); Route::redirect('/', config('app.homepage')); Route::get('dashboard', function () { return view('dashboard'); })->middleware(['auth', 'verified'])->name('dashboard'); Route::get('contest/{contest}/publish', [ContestController::class, 'publish'])->name('contest.publish'); Route::get('contest/{contest}/maintain', [ContestController::class, 'maintain'])->name('contest.maintain'); Route::get('contest/{contest}/export/{type}', [ContestController::class, 'export'])->name('contest.export'); Route::resource('contest', ContestController::class); // Route::get('/cup', function () { return view('cup'); })-name('cup.overview'); Route::middleware('auth')->group(function () { // Route::get('contest/registration/{registration}/{canceltoken}', [RegistrationController::class, 'destroy'])->name('registration.destroy'); Route::get('contest/registration/{registration}/switch/{action}', [RegistrationController::class, 'switch'])->name('registration.switch'); Route::resource('contest/registration', RegistrationController::class)->only([ 'show', 'store', 'edit', 'update', 'destroy' ]); }); Route::middleware('auth')->group(function () { Route::get('profile/welcome', [ProfileController::class, 'welcome'])->name('profile.welcome'); Route::get('profile', [ProfileController::class, 'edit'])->name('profile.edit'); Route::patch('profile', [ProfileController::class, 'update'])->name('profile.update'); Route::delete('profile', [ProfileController::class, 'destroy'])->name('profile.destroy'); }); Route::middleware('auth')->group(function () { Route::get('admin/range', [RangeController::class, 'list'])->name('ranges.list'); Route::resource('admin/organizer', OrganizerGroupController::class); Route::resource('admin/orgmember', OrganizerGroupUserController::class) ->only(['store', 'destroy']); }); require __DIR__.'/auth.php';