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
@@ -0,0 +1,38 @@
<?php
namespace App\Http\Controllers\Game;
use App\Http\Controllers\Controller;
use App\Models\ActivityLog;
use App\Models\Notification;
use Illuminate\Http\Request;
use Illuminate\View\View;
class DashboardController extends Controller
{
/**
* Display the game dashboard
*/
public function index(Request $request): View
{
$character = $request->user()->character;
if (!$character) {
return redirect()->route('game.character.create');
}
// Get recent activity logs
$recentActivity = ActivityLog::where('character_id', $character->id)
->latest()
->take(10)
->get();
// Get unread notifications
$unreadNotifications = $request->user()->notifications()
->whereNull('read_at')
->orderBy('created_at', 'desc')
->get();
return view('game.dashboard', compact('character', 'recentActivity', 'unreadNotifications'));
}
}