spatie/icalendar-generator
Generate RFC 5545 iCalendar (.ics) feeds with a fluent PHP API. Create calendars and events (start/end times, summary, metadata) for use in Apple Calendar, Google Calendar, and other clients. Outputs valid iCalendar text ready to serve or download.
.ics) generation, enabling seamless synchronization with external calendar apps (Google, Outlook, Apple)..ics files dynamically.response()->download()) and direct string generation for API responses or storage..ics generator) or augment it?config/app.php and bind it to a service container (e.g., CalendarGenerator facade).generateIcs() method or use a trait for reusable logic./events/{user}/calendar.ics for dynamic exports..ics generator or add it as a parallel feature.Event class (e.g., map startTime/endTime to Carbon instances).use Spatie\IcalendarGenerator\Event;
$event = Event::create('Meeting', 'Description')
->description('Team sync')
->startsAt(new \Carbon\Carbon('2023-10-01 10:00:00'))
->endsAt(new \Carbon\Carbon('2023-10-01 11:00:00'));
response()->download() with the generated .ics string.Content-Type: text/calendar.UTC vs. local time).FREQ=WEEKLY) against target calendar apps for accuracy.X-PROPERTY fields.Event class..ics files using online tools like icalendar.org or Apple Calendar..ics strings for debugging (e.g., file_put_contents('debug.ics', $icsString))..ics strings (e.g., Redis) if regenerated infrequently..ics files.isValid()).Event class..ics files.How can I help you explore Laravel packages today?