Initial commit: Lash Vanshy - Complete project with admin panel, gallery, products, and contact

This commit is contained in:
2026-04-08 00:23:16 -06:00
commit e07e065791
111 changed files with 17939 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Models\Galeria;
use App\Models\Mensaje;
use App\Models\Producto;
use Illuminate\View\View;
class DashboardController extends Controller
{
/**
* Mostrar el dashboard principal
*/
public function index(): View
{
// Obtener estadísticas
$stats = [
'mensajes_no_leidos' => Mensaje::noLeidos()->count(),
'total_modelos' => Galeria::count(),
'total_productos' => Producto::count(),
'productos_destacados' => Producto::where('destacado', true)->count(),
'modelos_activos' => Galeria::where('activo', true)->count(),
];
// Mensajes recientes
$mensajes_recientes = Mensaje::orderBy('created_at', 'desc')->take(5)->get();
return view('admin.dashboard.index', compact('stats', 'mensajes_recientes'));
}
}