I have this booking table
start_date | end_date
2020-12-15 2020-12-18
2020-12-19 2020-12-22
In this table booking data is getting saved, but i want to validate date before saving data, if start date and end date is between the database date then that record should not get saved.
I'm using this query :
$query = Booking::where('start_date', '>=', $request->start_date)->where('end_date','<=',$request->end_date)->get();
Any help is highly appreciated.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2JGedTw
via IFTTT
Aucun commentaire:
Enregistrer un commentaire