spatie/calendar-links
Generate “Add to calendar” links and ICS files for events. Supports Google Calendar, iCal/Apple Calendar, Outlook and more. Define title, start/end, description and location, then get shareable URLs or downloadable .ics content for your app.
Link::$from and Link::$to are now DateTimeImmutable (previously DateTime)Link::$title, $from, $to, and $allDay are now public readonly; $description and $address are public. The magic __get() method has been removed.$allDay parameter from Link::create() — use Link::createAllDay() insteadLink::createAllDay() end date is now inclusive (the constructor internally adds +1 day for calendar services)Link constructor is now finalInvalidLink::invalidDateRange() — use InvalidLink::negativeDateRange() insteadBaseOutlook::baseUrl() visibility changed from public to protectedWebOffice and WebOutlook classes are now finalprivate const (prevents override via subclassing)PRODID via options arrayLink::createAllDay() now returns static instead of selfDTSTAMP now always uses UTC datetime for all-day events (RFC 5545 compliance)VALUE=DATE parameter to DTSTART for all-day events (RFC 5545 compliance)escapeString() now properly handles backslashes, semicolons, commas, and newlines per RFC 5545 section 3.3.11declare(strict_types=1) to all source files#[\Override] attributesDateTimeImmutable throughout instead of mutable DateTime[@test](https://github.com/test) annotations with PHPUnit #[Test] attributesDESCRIPTION instead of X-ALT-DESC (as it has better support) by @cdubz in #158PRODID and DTSTAMP required parameters to make ICS valid by @makbetaWebOffice and WebOutlook into a parent class by @lptnfrom and to dates and is the same for both (@bradyemerson)allday parameter only for a single-day eventsInvalidLink now extends \InvalidArgumentExceptionUID ICS links (https://github.com/spatie/calendar-links/pull/85)\DateTimeImmutable::class)$link->formatWith(new Your\Generator())enddt for single-day events)Link::createAllDay static constructor to simplify creating of all-day events; character (according RFC 5545)\n instead of %0A when generating an ics fileHow can I help you explore Laravel packages today?