Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ical Laravel Package

eluceo/ical

eluceo/ical is a PHP library that lets you create RFC 5545-compliant .ics calendar files through a clean domain abstraction, with a separate presentation layer handling output. Install via Composer.

View on GitHub
Deep Wiki
Context7

iCal-creator for PHP

Frequently asked questions about Ical
How do I install eluceo/ical in a Laravel application?
Run composer require eluceo/ical and you are done. There is no service provider, facade, or publishable config, because the package is a plain framework-agnostic PHP library rather than a Laravel module. Most teams wrap it in a small service class inside an app/Calendar namespace that maps their own models (Appointment, Shift, Subscription) into Eluceo domain objects.
Which PHP versions does eluceo/ical support, and will it work with my Laravel version?
Version 2.16 and above require PHP 8.4 to 8.5, 2.15 supports 8.3 to 8.4, and releases below 2.14 support 7.4 to 8.3. There is no Laravel-specific pinning, so any Laravel release that satisfies the Composer PHP constraint will work. Note that the maintainer drops older PHP minors in the same release that adds new ones, so a Laravel app on PHP 8.2 or 8.3 will be pinned to an older minor and should be treated as a deliberate decision rather than a surprise during composer update.
How do I return an .ics file download from a Laravel controller?
Build the event, add it to a calendar, pass the calendar through the Presentation CalendarFactory, and cast the result to a string. Then return a normal Laravel response with the Content-Type header set to text/calendar; charset=utf-8 and a Content-Disposition header of attachment with your filename. The whole flow is roughly four lines of library code, so the controller stays thin and the mapping logic can live in a dedicated service.
How do I handle all-day and multi-day events with eluceo/ical?
The domain layer provides SingleDay and MultiDay value objects alongside Date and DateTime, so all-day and spanning events are described explicitly instead of being faked with midnight timestamps. Timezone data is handled through the TimeZone domain entity, which matters because all-day semantics are one of the most common sources of client incompatibility. Map your application dates into these value objects early and keep the mapping in one place so timezone fixes are not scattered across controllers.
Does eluceo/ical support recurring events and RRULE?
The documented domain vocabulary centres on calendars, single and multi-day events, durations, locations, geo coordinates, and email addresses rather than on a full recurrence rule model. If your product needs RRULE, BYSETPOS, or complex expansion, verify current support in the official documentation before committing, and consider generating concrete occurrences yourself or pairing with a recurrence-aware library such as kigkonsult/icalcreator. For one-off event export and published feeds the package is a clean fit.
Can eluceo/ical read or parse existing .ics files?
No. The library is a writer only: it takes domain objects and serializes them into RFC 5545 output. Inbound calendar ingestion, validation of third-party feeds, and round-tripping are explicitly out of scope. If you need both directions, treat eluceo/ical as half the solution and add a separate parser or a different library for the import path.
What is the difference between the Domain and Presentation namespaces in eluceo/ical?
Domain holds the entities and value objects that describe what the calendar is, such as Calendar, Event, TimeZone, Date, DateTime, SingleDay, MultiDay, Duration, Location, Geo, and EmailAddress. Presentation holds the factory that renders those objects as RFC 5545 text. That split is effectively a miniature hexagonal core, which makes the mapping layer trivially unit testable: assert on the generated string for DTSTART, DTEND, or SUMMARY without touching HTTP or the framework.
Will my generated .ics files render correctly in Outlook, Google Calendar, and Apple Calendar?
The library follows RFC 5545 as closely as it reasonably can, but calendar clients have their own quirks and tolerances, especially around timezones, all-day events, and line folding. The library cannot own that compatibility surface for you, so test real files against every consumer you care about, including Outlook and Exchange if they are in scope. Decide up front whether you need the ATTENDEE, ORGANIZER, and METHOD:REQUEST invite flow or just a published subscription feed, because those are different rendering paths.
How do I upgrade from eluceo/ical 0.x to version 2?
Treat it as a rewrite rather than an upgrade. Version 2.0.0 split the domain and presentation layers, removed the old property classes, and changed the fluent builder API, so 0.x code will not run unchanged. An official upgrade guide exists and should be read before estimating the work; the data mapping is usually quick, while timezone and all-day semantics are the fiddly part.
Is eluceo/ical actively maintained, and how hard would it be to replace?
It is an MIT-licensed library with a small, focused surface maintained primarily by a single author, so the exit cost is genuinely low. Because there is no framework coupling and no database or queue involvement, you can isolate it behind an adapter and swap in another ICS writer later without touching your domain. Ignore the Dependents: 0 figure on the repository as an adoption signal, since it appears to be a metadata artifact while real usage is tracked through Packagist download stats.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
labyrinthe/connect-php
encore2/laravel-admin2
cboxdk/laravel-console-kit
shapecode/doctrine-dbal-datetimeutc
gilads-otiannoh254/inertia-protocol
dakiquang/laravel-oauth-refresh-lock
woda/laravel-worktrees
dalefranks/ramasite
faghy/laracashbook
roundly-consulting/google-places-for-laravel
roundly-consulting/kubernetes-api-for-laravel
roundly-consulting/plausible-for-laravel
gvp/gvp-laravel-template
metasyncsite/laravel-metasync-client
roundly-consulting/onboarding-for-laravel
adachsoft/cli-process-tester
adachsoft/changelog-linter
adachsoft/collection
adachsoft/php-code-style
adachsoft/api-version-bundle