mardi 25 octobre 2016

Laravel 5: Check if event date range is not already taken

I'm creating calendar for few days events and the events can not overlap. But event can start/end when another event starts/ends.

In Laravel, in my event model table I am storing start and end date of events. How can I check before storing new event do database, if it is valid (is not overlapping with existing events, excluding margin/boundary days) ?

This is the idea

In advance thank you very much for Your help.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire