Initial commit of the complete City10 virtual city simulation platform. Backend (Laravel 13): - REST API with Sanctum tokens and session-based web authentication - Role-based access control (admin/user) with middleware protection - AI agent CRUD with OpenRouter.ai integration restricted to free models - Store management with 3D coordinates and AI shopkeeper assignment - Versioned legal documents (Terms, Privacy, Cookies) with LGPD audit trail - Math CAPTCHA on public forms and multi-language support (pt_BR, en, es) Frontend: - Responsive Blade templates with Tailwind CSS v4 - Three.js 3D city viewer with SSE chat streaming to AI agents - Admin panel for store and user administration Infrastructure: - MariaDB/MySQL database with comprehensive migrations - Database seeders for demo content and test accounts - PHPUnit test suite and Laravel Pint code styling - Vite build configuration with hot reload
31 lines
708 B
PHP
31 lines
708 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Web;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\View\View;
|
|
|
|
/**
|
|
* Dashboard controller for the authenticated web area.
|
|
*
|
|
* Phase 1 renders an overview panel; the full admin console and 3D city
|
|
* viewer are delivered in subsequent phases.
|
|
*/
|
|
class DashboardController extends Controller
|
|
{
|
|
/**
|
|
* Show the user dashboard overview.
|
|
*/
|
|
public function __invoke(Request $request): View
|
|
{
|
|
$user = $request->user();
|
|
|
|
return view('dashboard.index', [
|
|
'user' => $user,
|
|
'isAdmin' => $user->isAdmin(),
|
|
'storeCount' => $user->stores()->count(),
|
|
]);
|
|
}
|
|
}
|