laravel-calendar-events icon indicating copy to clipboard operation
laravel-calendar-events copied to clipboard

Work with multiple events

Open buddy94 opened this issue 4 years ago • 2 comments

Hi, I was looking to use your excellent package but I don't understand how you can implement a search with multiple events.

I explain: you have provided this method: $event->getEventsBetween('2021-01-05', '2021-01-15'); With this I can retrieve all the recurrences between two dates of that particular event. But what if I have multiple events with multiple recurrences each and I want to retrieve all the events (or recurrences of those events) beetwen two dates?

Something like this: $collectionOfEvents->getEventsBetween('2021-01-05', '2021-01-15');

I also would like to ask you if you could provide an example with laravel and an interaction with a db.

Thank you in advance :)

buddy94 avatar Feb 26 '21 10:02 buddy94

Try default Eloquent where clause for multiple events.

rebootcode avatar Mar 04 '21 05:03 rebootcode

Are there any examples of such a query? For example, most calendar implementations just show a month/week/day at time, which fetches through specific dates (that current month for example). How can you create a query that accounts for events created in the past, that are recurring, and should show up in the current set of dates?

hotsaucejake avatar Jan 26 '24 00:01 hotsaucejake