igaster/laravel-theme
Add multi-theme support to Laravel apps with igaster/laravel-theme. Organize views, assets, config, and translations per theme, switch themes at runtime, and fall back gracefully to default views. Simple integration for building customizable, themeable Laravel applications.
Architecture fit
igaster/laravel-theme is a presentation-layer package. It hooks Laravel's view finder and asset publishing to resolve views/assets from a selected theme, with theme inheritance and fallback to the default. It composes cleanly with the framework's service-provider and view-finder contracts, so coupling is low provided themes stay a rendering concern — the moment theme conditionals leak into domain/business logic, the abstraction becomes expensive to unwind. Best fit: server-rendered Blade apps needing white-label or multi-tenant branding. Poor fit: API-only services, Inertia/SPA or Livewire-heavy apps where the view finder is not the real theming seam.
Integration feasibility
Low-to-moderate effort. Composer install with package auto-discovery, publish config, define theme directories, migrate views. The API surface is small (Theme:: facade, config, artisan helpers), so a competent Laravel developer can complete a spike in under a day. The real cost is not installation but migrating existing views into a theme structure and re-validating the asset pipeline.
Technical risk The dominant risk is maintenance velocity, not code quality. This release is a patch (v2.0.23 → v2.0.24) containing two long-overdue compatibility fixes, both authored by first-time contributors:
@js/@css directive conflicts on Laravel 9+, i.e. the package was colliding with core Blade directives for roughly two major framework versions.Read together, these signal a package that lags the framework rather than tracks it. Neither fix is breaking, and neither introduces new surface area — but the notes are silent on Laravel 10/11 support, PHP 8.3/8.4, and the current test matrix. Single-maintainer projects with sporadic release cadence are a bus-factor and succession risk. Security exposure is minimal (no user input handling, no persistence), so the risk profile is "operational drag," not "vulnerability."
Key questions
@js/@css fix compatible with @vite, or only the legacy directive path?Stack fit Target Laravel 9+ Blade-rendered applications with a genuine multi-brand, multi-tenant, or white-label requirement. Do not adopt for single-theme apps — the indirection costs more than it saves.
Migration path
Strangler pattern, not a rewrite. Keep the existing resources/views as the default theme so any un-migrated view continues to resolve. Introduce one additional theme, migrate a bounded slice of views (e.g. layout + one module), and verify rendering parity before expanding. If replacing a homegrown switcher, map its resolution order onto the package's inheritance rules first and confirm equivalence.
Compatibility
Pin to ^2.0.24 — that floor is the point of this release, since earlier 2.0.x carries both the Blade directive collision and the PHP 8.2 deprecation warnings. Before committing, run a branch spike against the exact Laravel and PHP versions in production, and explicitly exercise @js/@css/@vite rendering plus theme switching under cached views. Verify no other installed package extends the view finder.
Sequencing
@js/@css and @vite behave.Maintenance Steady-state code churn is near zero — themes are just views and assets. The maintenance burden sits with the dependency: track upstream releases and treat a multi-year gap as a trigger to evaluate forking or vendoring. Budget a contingency line for a hard fork; the codebase is small enough that this is credible.
Support Community-only. Single maintainer, GitHub issues, no SLA, no commercial backing. Internal escalation must assume "we fix it ourselves." Assign a named internal owner so issues do not orphan.
Scaling Per-request view resolution adds path lookups proportional to the number of theme candidates; negligible at typical volumes. Watch two things: dynamic per-request theme selection combined with compiled-view caching (cache key correctness), and asset duplication across themes inflating deploy size. Standard Laravel view/route/config caching applies normally.
Failure modes
@js/@css output — a class of failure that renders wrong rather than erroring.Ramp-up Small. Half a day for an experienced Laravel developer to be productive; the non-obvious parts are the inheritance/fallback resolution order and the per-theme asset pipeline. Document both locally — upstream documentation is thin and you will be the long-term source of truth.
How can I help you explore Laravel packages today?