mauricius/laravel-htmx
mauricius/laravel-htmx integrates HTMX with Laravel through Blade directives, HTMX-aware middleware, response helpers, and validation support. It helps detect HTMX requests, return partial responses, and build fast, dynamic, server-rendered interfaces with minimal custom JavaScript.
Architecture fit. mauricius/laravel-htmx is a thin convenience layer, not a framework: Blade directives that emit hx-* attributes, a fluent response builder for HX-* headers, and middleware that normalizes HTMX request/redirect behavior. It does not own the request lifecycle, the view layer, or any state model. That is a favorable profile — the worst case is removing the package and hand-writing the attributes and headers, so switching cost is measured in hours, not sprints. It sits at the edge of the architecture, which limits blast radius.
Integration feasibility. Composer package with Laravel auto-discovery. No database, no queue, no external service, no infrastructure change. Fits any Blade-rendered Laravel app on a supported PHP version. v0.10.0 is a compatibility release only: PR #35 is Laravel Shift automation, PR #36 is the maintainer's Laravel 13 upgrade. No new features, no deprecations called out in the notes — the substance is a framework constraint bump.
Technical risk.
Key questions. What are the exact Laravel and PHP constraints in v0.10.0 — does it support 11/12/13 concurrently? What is the minimum PHP version? Which HTMX version is tested? Is there a CI matrix across framework versions, and what is the test coverage? Did any Blade directive or public method signature change between 0.9.0 and 0.10.0? Is there a stated security/release policy or a 1.0 timeline?
Stack fit. Good for Laravel monoliths and Blade-rendered apps adopting HTMX for partial-page updates. Poor fit for API-only backends, SPA/Inertia/React-Vue front ends, or teams already committed to Livewire — that is an overlapping problem space with a competing paradigm, and mixing the two fragments the codebase's mental model.
Migration path. v0.9.0 → v0.10.0 should be a Composer constraint bump only, since the changelog lists framework compatibility rather than API change. Verify that assumption rather than trusting it: diff composer.json constraints and any src/ signatures. From a standing start: composer require mauricius/laravel-htmx, rely on auto-discovery, optionally publish config and register middleware.
Compatibility. Pin the 0.x minor and route dependency bumps to manual review rather than auto-merge. Because the package tracks Laravel majors, the framework upgrade and the package upgrade must be sequenced together — treating them as independent tickets is how teams end up locked out of a Laravel upgrade.
Sequencing.
hx-* attributes as the documented fallback so no feature is blocked on the package.Maintenance. Low day-to-day: no migrations, no background jobs, no runtime state to babysit. The real cost is version tracking — budget a review at each Laravel major and each HTMX major, and name an owner. This is the class of dependency that quietly blocks a framework upgrade six months after everyone stopped looking at it.
Support. Community OSS, single maintainer, no commercial SLA. Plan as if unsupported: acceptable for a presentation layer where a workaround always exists, not acceptable where you'd need a vendor to unblock you.
Scaling. No meaningful runtime scaling impact — the package emits strings. Scaling characteristics are inherited from the app's fragment endpoints, cache strategy, and request volume. Watch hx-trigger polling and hx-boost patterns; those multiply request volume far more than anything the package does.
Failure modes.
HX-Redirect/HX-Trigger behavior quietly disappears. Mitigate with a smoke test asserting on response headers.HX-Redirect divergence produces "nothing happens" bugs that are hard to trace without HTMX fluency.hx-* requests returning 419s that look like server faults.Ramp-up. A Laravel developer is productive with the package API in under a day. The genuine learning curve is HTMX's request/response and partial-swap model, which is a team-level skill, not a package concern. Invest in a short internal reference doc and one exemplar feature so patterns don't fragment across the codebase.
Recommendation. Adopt — or retain — with a pinned 0.x constraint and manual review of minor bumps. Confirm the exact Laravel/PHP matrix before treating v0.10.0 as the green light for a Laravel 13 upgrade. No blocking risk given the low exit cost.
How can I help you explore Laravel packages today?