- What Laravel versions does the Livewire starter kit support?
- The starter kit is officially tested with Laravel 10+ and requires PHP 8.1+. Always verify compatibility with Livewire 4’s latest requirements, as minor Laravel updates may introduce breaking changes.
- How do I add authentication to this starter kit?
- Authentication isn’t included by default. Use Laravel’s built-in packages like Sanctum (API), Jetstream (full-stack), or Fortify (minimalist) for OAuth, sessions, or email verification. Follow their docs to integrate with Livewire’s session handling.
- Can I use this kit with existing Laravel projects?
- Yes, but plan for incremental adoption. Start by replacing static Blade components with Livewire equivalents (e.g., forms, tables) while keeping legacy JS. Use Alpine.js for lightweight interactions if needed.
- What’s the best way to test Livewire components?
- Use PestPHP for unit/feature tests with Livewire’s testing helpers (e.g., `Livewire::test()`). For browser tests, Dusk works but may require custom setups for complex interactions. Mock external APIs with Laravel’s HTTP testing.
- Does this kit work with Laravel Vapor or Forge?
- Absolutely. The starter kit follows Laravel’s deployment conventions, so it integrates natively with Vapor (serverless) or Forge (shared hosting). Tailwind’s build process is optimized for both environments.
- How do I optimize Livewire for high-traffic pages?
- Debounce expensive operations (e.g., `wire:change` events), lazy-load components, and use Livewire’s `wire:ignore` for static DOM elements. For global state, leverage Laravel’s session or Redis with Livewire’s `wire:model.lazy`.
- Can I replace Tailwind CSS with another framework?
- Yes, but you’ll need to remove Tailwind’s dependencies (`@tailwind` directives, `postcss.config.js`) and replace them with your preferred CSS solution (e.g., Bootstrap, Bulma). The kit’s Blade/Livewire structure remains compatible.
- What if I need complex global state beyond Livewire’s scope?
- Livewire’s reactivity is component-scoped, so for app-wide state (e.g., user preferences), use Laravel’s session or Redis with packages like `spatie/laravel-activitylog` or custom event broadcasting. Avoid overloading Livewire’s session.
- Are there alternatives to this starter kit for Livewire?
- For Laravel, consider `laravel-livewire-starter` (community-driven) or Jetstream (includes Livewire + auth). For non-Laravel stacks, use Livewire’s standalone installation or frameworks like Livewire’s Vue/React bridges.
- How do I migrate an existing Livewire 3 app to this kit?
- Update Livewire to v4 via Composer, then incrementally replace Blade templates with the kit’s structure. Check Livewire’s migration guide for breaking changes (e.g., `wire:model` syntax updates). Test thoroughly with PHPUnit/Pest.