mercredi 1 juillet 2020

whereBetween on two columns in laravel on two time columns in laravel

Basically i have a project in which i have to create a reservation for anything say computer's reservation on cyber shop so suppose one user has start time of reservation is 6:00 PM to 7:00 PM.I have two columns to store the start and end time named start_time and end_time. Suppose second user came and creating a reservation for 6:30 PM to 7:30 Pm then this user get prompts that computer is booked in between this time,3rd scenario will be reservation from 5:30 PM to 6:30 Pm ,4th scenario will be 06:30 to 06:45 PM ,4th scenario will be 5:00 pPM to 8:00 PM. Simply we can say that if the start_time or end_time lies between any reservation then i have to prompt a error. I am unable to do the same validation.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire