Archived
1
0
Fork 0
This repository has been archived on 2026-06-16. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
wow-raid-bingo/routes/web.php

66 lines
2.4 KiB
PHP

<?php
use Illuminate\Support\Facades\Route;
use App\Http\Livewire\Game;
use App\Http\Livewire\Setup;
use App\Http\Controllers\SettingController;
use App\Http\Controllers\AuthController;
use App\Http\Livewire\Form\AccountForm;
use App\Http\Controllers\Admin\AdminController;
use App\Http\Controllers\Admin\CardController;
use App\Http\Controllers\Admin\CharacterController;
use App\Http\Controllers\Admin\RaidController;
use Illuminate\Support\Facades\Session;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return redirect()->route('setup');
});
Route::get('/setup', Setup::class)->name('setup');
route::get('/setup/{setting}', [SettingController::class, "hash"])->name('setup-hash');
Route::get('/game', Game::class)->name('game');
// Admin section
Route::prefix('admin')->group(function () {
// Auth
Route::get('/login', [AuthController::class, 'create'])->name('login');
Route::post('/login', [AuthController::class, 'store']);
Route::middleware(['auth'])->group(function () {
Route::get('/', [AdminController::class, 'index'])->name('admin');
Route::get('/account', AccountForm::class);
Route::get('/cards', [CardController::class, 'index'])->name('admin.card.index');
Route::get('/cards/new', CardController::getForm())->name('admin.card.create');
Route::get('/cards/{card}', CardController::getForm())->name('admin.card.edit');
Route::get('/characters', [CharacterController::class, 'index'])->name('admin.character.index');
Route::get('/characters/new', CharacterController::getForm())->name('admin.character.create');
Route::get('/characters/{character}', CharacterController::getForm())->name('admin.character.edit');
Route::get('/raids', [RaidController::class, 'index'])->name('admin.raid.index');
Route::get('/raids/new', RaidController::getForm())->name('admin.raid.create');
Route::get('/raids/{raid}', RaidController::getForm())->name('admin.raid.edit');
Route::post('/logout', [AuthController::class, 'destroy'])->name('logout');
});
});