first commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?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';
|
||||
Reference in New Issue
Block a user