I have to write query where I need to get salons where there is no reservations so I am writing this:
Salon::whereHas('reservationsSalons', function($q) {
$q->whereNotBetween('start_time', [request()->start_time, request()->end_time]);
})
->get();
But the problem is I am not getting salons where there is no reservations. So I need something like
->orwhereNotHas('reservationsSalons')
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire