marcorieser/statamic-livewire
Bring Laravel Livewire to Statamic with seamless integration for interactive, reactive components inside your Statamic sites. Build dynamic UIs without heavy JavaScript, use familiar Livewire patterns, and keep content and frontend working smoothly together.
Pros:
Cons:
@stack, @push).Statamic Compatibility:
{{ cache }} in Antlers) could conflict with Livewire’s reactive updates. Mitigation: Exclude Livewire components from caching or use Statamic’s {{ cache:disable }} directive.Technical Risk:
php artisan statamic:clear + Livewire updates).Best For:
Less Suitable For:
composer require marcorieser/statamic-livewire
| Factor | Compatibility Notes |
|---|---|
| Statamic Version | Tested with Statamic 4.x (assume Laravel 10/11 compatibility). Check for breaking changes if using older versions. |
| Livewire Version | Align with the package’s supported Livewire version (e.g., Livewire 3.x). Major Livewire updates may require package updates. |
| Templating | - Antlers: Works but may require Blade-like syntax for complex components. - Blade: Full feature parity. |
| Asset Pipelines | Livewire’s JS/CSS must be included in Statamic’s build process (e.g., Vite @livewireScripts, Laravel Mix). |
| Caching | Statamic’s {{ cache }} may interfere with Livewire updates. Use {{ cache:disable }} or exclude Livewire components from caching. |
| Authentication | Livewire components in Statamic may need middleware (e.g., auth, verified) or Statamic’s built-in auth (e.g., {{ if logged_in }}). |
| Database/Queries | Livewire components can query Statamic’s database directly (e.g., Entry::where(...)), but optimize to avoid N+1 queries. |
| Third-Party Packages | Potential conflicts with other Livewire packages (e.g., livewire-tables). Test in isolation. |
How can I help you explore Laravel packages today?