Files
2026-06-27 14:38:18 +03:00

26 lines
866 B
PHP

<?php
use App\Http\Controllers\ProfileController;
use Illuminate\Support\Facades\Route;
// Include game routes first (they handle the root route)
require __DIR__.'/game.php';
// Keep the old dashboard route for compatibility
Route::get('/dashboard', function () {
if (auth()->check() && auth()->user()->character) {
return redirect()->route('game.dashboard');
}
return view('dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');
// Profile routes
Route::middleware('auth')->group(function () {
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');
});
// Authentication routes
require __DIR__.'/auth.php';