odan/session
Odan/session is a session middleware for Slim and other PSR-15 applications. It provides a clean SessionInterface for reading and writing session data, flash messages, configurable session handlers, and straightforward PHP-DI integration for Slim 4.
checkout, wizard, admin) without key-prefix conventions. That maps directly to product modules and makes it cheap to add or retire a flow — e.g., a multi-step onboarding wizard can own its own segment and be deleted wholesale when the flow is redesigned.Session class plus PSR-15 middleware means the same session layer survives a move between Slim, Mezzio, or a bespoke kernel. If your roadmap includes re-platforming or extracting a service out of a monolith, this reduces the blast radius of that migration.Illuminate\Session does not come with you. This is a credible way to preserve flash messages and session semantics in the extracted service without dragging the framework along.Adopt when all of these hold:
Look elsewhere when:
Illuminate\Session already provides flash data, drivers (Redis, database, cookie, array), encryption, and CSRF integration. Introducing this package in a Laravel app duplicates a solved problem, adds a second session abstraction, and creates a confusing "which session do I use?" convention that will outlive your tenure. The one legitimate exception is a package you intend to ship to both Laravel and non-Laravel users — and even then, only behind an adapter.$_SESSION.One-liner for executives: This is a small, free (MIT), well-scoped open-source component that removes a few days of low-value plumbing from our Slim/PHP services and standardizes how "success" and "error" messages reach users — a low-cost, low-risk dependency, not a platform bet.
For engineering leadership:
Success signal: we delete session-related boilerplate from two or three services, flash-message bugs stop appearing in QA, and nobody has had to read the library's source in six months — which is exactly the outcome you want from a dependency this size.
How can I help you explore Laravel packages today?