first commit

This commit is contained in:
Doar Mihai
2026-06-27 14:38:18 +03:00
commit 96d317480b
165 changed files with 20061 additions and 0 deletions
+25
View File
@@ -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';