Total
Salidas de Hoy
@php
$hoy = date('Y-m-d');
// Contar salidas regulares de hoy
$salidasHoyRegulares = \App\Models\Salida::where('fecha', '=', $hoy)->where('activo', 1)->where('recurrente', 0)->count();
// Obtener el día de la semana actual en minúsculas (por ejemplo: "monday", "tuesday", etc.)
$diaActual = strtolower(date('l'));
// Contar salidas recurrentes que ocurren hoy
$salidasHoyRecurrentes = \App\Models\Salida::where('recurrente', 1)
->whereRaw("JSON_CONTAINS(dias_semana, '\"" . $diaActual . "\"')")
->where('activo', 1)
->count();
// Sumar el total de salidas de hoy (regulares + recurrentes)
$totalSalidasHoy = $salidasHoyRegulares + $salidasHoyRecurrentes;
@endphp
{{ $totalSalidasHoy }}