@php
$totalHommeOccupe = 0;
$totalFemmeOccupe = 0;
$litsDisponiblesCount = 0;
foreach($lits as $lit) {
if(!$lit['est_dispo']) {
if($lit['sexe_occupe'] === 'homme') $totalHommeOccupe++;
if($lit['sexe_occupe'] === 'femme') $totalFemmeOccupe++;
} else {
$litsDisponiblesCount++;
}
}
@endphp
مشغول (رجال)
{{ $totalHommeOccupe }}
مشغول (نساء)
{{ $totalFemmeOccupe }}
الأسرّة المتاحة
{{ $litsDisponiblesCount }}/{{ $chambre->capacite }}