symfony/ux-calendar-link
Symfony UX Calendar Link provides a simple Twig helper for adding “add to calendar” links to Symfony apps. Generate Google, Outlook, and ICS event links with minimal configuration, letting users save events without building calendar integrations yourself.
composer require symfony/ux-calendar-link. The package is Symfony UX, not Laravel, but the underlying pattern (build an event value object, hand it to a link generator, render an anchor) ports directly to Laravel controllers and Blade views.Symfony\UX\CalendarLink\CalendarLinkInterface, CalendarLinkFactory, and the CalendarEvent model. The Twig extension and <twig:CalendarLink> component are thin wrappers over these.CalendarEvent (title, start, end, description, location, timezone) plus a provider name (google, outlook, yahoo, ical) and render the returned URL into an <a href>.Event::toCalendarEvent()) and reuse it everywhere links appear (detail page, confirmation email, API payload). Keep the mapping in one class so timezone and all-day rules stay consistent.ical, expose a controller route that returns the generated payload with Content-Type: text/calendar; charset=UTF-8 and a Content-Disposition: attachment filename. Generate absolute URLs (URL::to() / url()) so links work in emails.$event, $providers, and an optional $variant (button row, dropdown, icon links). Same partial serves both pages and mailables when you pass inline styles.CalendarLinkService in the container that wraps provider generation and caches per-event-per-provider output for the request. Calendar links are pure functions of the event data, so memoizing is safe.YYYYMMDDTHHMMSSZ form, and location. Freeze the clock (Carbon::setTestNow()) so date assertions are stable across midnight and DST boundaries.VTIMEZONE, which means the library previously mis-detected some UTC-ish zone names. If you upgraded from 3.5.0, re-check any event where timezone is UTC, Etc/UTC, GMT, or a fixed-offset string — output can shift. Prefer IANA names (Europe/Paris) over abbreviations (CET) and avoid Windows names (Romance Standard Time).^3.6 rather than * so future timezone fixes come through predictably.Z suffix vs VTIMEZONE block: for UTC events, expect timestamps ending in Z and no timezone block. If you see both, you are mixing UTC-normalized DateTime objects with a non-UTC timezone argument — make them agree.google; keep the full text for the .ics download.description must be \n in the iCal payload but %0A in a URL. Let the generator handle it and never hand-concatenate query strings.importmap/encore entries before blaming the package..ics route takes an event ID, authorize it like any other resource. Calendar clients fetch these URLs without session cookies in some flows, so prefer signed URLs for public sharing.CalendarLinkInterface with a getProviderName() and getCalendarUrl() to add providers (Teams, Calendly deep links) without forking. Register with the ux_calendar_link.provider tag if autoconfiguration is off.How can I help you explore Laravel packages today?