%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/loslex_o/demo/routes/
Upload File :
Create Path :
Current File : /www/loslex_o/demo/routes/web.php

<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\ContestController;
use App\Http\Controllers\CupResultsController;
use App\Http\Controllers\IcsController;
use App\Http\Controllers\LocaleController;
use App\Http\Controllers\OrganizerGroupController;
use App\Http\Controllers\OrganizerGroupUserController;
use App\Http\Controllers\OrganizerUsersController;
use App\Http\Controllers\ProfileController;
use App\Http\Controllers\RangeController;
use App\Http\Controllers\RegistrationController;

/*
|--------------------------------------------------------------------------
| 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'])->name('dashboard');


Route::get('changelog',                 function() { return view('static.changelog'); })->name('changelog');
Route::get('contact',                   function() { return view('static.support.contact-cs'); })->name('contact');
Route::get('gdpr',                      function() { return view('static.gdpr-cs'); })->name('gdpr');
Route::get('rules',                     function() { return view('static.rules-cs'); })->name('rules');
Route::get('support/become-organizer',  function() { return view('static.support.become-organizer-cs'); })->name('support.becomeorganizer');
Route::get('support/contest-create',    function() { return view('static.support.contest-create-cs'); })->name('support.contestcreate');
Route::get('support/contest-register',  function() { return view('static.support.register-cs'); })->name('support.contestregister');
Route::get('support/ics',               function() { return view('static.icsimport-cs'); })->name('support.icsimport');

// contest routes have auth middleware implemented in the ContestController::class as list/show routes does not need auth
Route::get('contest/{contest}/publish/{status}',    [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::get('contest/{contest}/email/{type}',        [ContestController::class, 'email'])->name('contest.email');
Route::get('contest/{contest}/fdel/{fname}',        [ContestController::class, 'fileDelete'])->name('contest.fdelete');
Route::get('contest/{contest}/fdwn/{fname}',        [ContestController::class, 'fileDownload'])->name('contest.fdownload');
Route::post('contest/{contest}/import',             [ContestController::class, 'processImport'])->name('contest.process-import');
Route::get('contest/{contest}/presentation',        [ContestController::class, 'presentation'])->name('contest.presentation');
Route::get('contest/{contest}/detailed-results',    [ContestController::class, 'detailedResults'])->name('contest.detailed-results');
Route::get('contest/{contest}/overview-results',    [ContestController::class, 'overviewResults'])->name('contest.overview-results');
Route::get('contest/{contest}/ceremonies',          [ContestController::class, 'ceremonies'])->name('contest.ceremonies');
Route::get('contest/{contest}/publish-results',     [ContestController::class, 'toggleResultPublication'])->name('contest.publish-results');
Route::post('contest/{contest}/changesquad',        [ContestController::class, 'changesquad'])->name('contest.changesquad');
Route::resource('contest', ContestController::class);

Route::middleware('auth', 'verified')->group(function () {
    Route::get('contest/registration/{registration}/{canceltoken}', [RegistrationController::class, 'destroy'])->whereUuid('canceltoken')->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']);
});

Route::resource('range', RangeController::class)->except(['destroy']);

Route::get('ics/contests',                      [IcsController::class, 'contests'])->name('ics.contests');
// Route::get('ics/registration/{registration}',   [IcsController::class, 'registration']);    //->name('ics.contests.single');
// Route::get('ics/range/{range}',                 [IcsController::class, 'range']);
// Route::get('ics/user/{token}',                  [IcsController::class, 'user']);
// Route::get('ics/type/{type}',                   [IcsController::class, 'filtertypes']);

Route::get('cup', [CupResultsController::class, 'results'])->name('cup.results');
Route::get('cup/clear', [CupResultsController::class, 'clear'])->name('cup.clear'); // DEBUG route

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', 'verified')->group(function () {
    Route::resource('admin/organizer', OrganizerGroupController::class);
    Route::resource('admin/orgmember', OrganizerGroupUserController::class)->only(['store', 'destroy']);
    Route::resource('admin/users', OrganizerUsersController::class);
});

require_once __DIR__.'/auth.php';

Zerion Mini Shell 1.0