Loading...
Loading...
Livewire 3 reactive components - wire:model, actions, events, Volt, Folio. Use when building reactive UI without JavaScript.
npx skill4agent add fusengine/agents laravel-livewireTeamCreate| Feature | Description |
|---|---|
| Components | Reactive PHP classes with Blade views |
| wire:model | Two-way data binding |
| Actions | Call PHP methods from frontend |
| Events | Component communication |
| Volt | Single-file components |
| Folio | File-based routing |
Component choice?
├── Complex logic → Class-based component
├── Simple page → Volt functional API
├── Medium complexity → Volt class-based
├── Quick embed → @volt inline
└── File-based route → Folio + VoltBinding type?
├── Form fields → wire:model.blur
├── Search input → wire:model.live.debounce.300ms
├── Checkbox/toggle → wire:model.live
├── Select → wire:model
└── No sync → Local Alpine x-data| Topic | Reference | When to Consult |
|---|---|---|
| Components | components.md | Creating components |
| Wire Directives | wire-directives.md | Data binding, events |
| Lifecycle | lifecycle.md | Hooks, mount, hydrate |
| Forms | forms-validation.md | Validation, form objects |
| Events | events.md | Dispatch, listen |
| Alpine | alpine-integration.md | $wire, @entangle |
| File Uploads | file-uploads.md | Upload handling |
| Nesting | nesting.md | Parent-child |
| Loading | loading-states.md | wire:loading, lazy |
| Navigation | navigation.md | SPA mode |
| Testing | testing.md | Component tests |
| Security | security.md | Auth, rate limit |
| Volt | volt.md | Single-file components |
| Topic | Reference | When to Consult |
|---|---|---|
| Folio | folio.md | File-based routing |
| Precognition | precognition.md | Live validation |
| Reverb | reverb.md | WebSockets |
| Template | When to Use |
|---|---|
| BasicComponent.php.md | Standard component |
| FormComponent.php.md | Form with validation |
| VoltComponent.blade.md | Volt patterns |
| DataTableComponent.php.md | Table with search/sort |
| FileUploadComponent.php.md | File uploads |
| NestedComponents.php.md | Parent-child |
| ComponentTest.php.md | Testing patterns |
class Counter extends Component
{
public int $count = 0;
public function increment(): void
{
$this->count++;
}
public function render()
{
return view('livewire.counter');
}
}<?php
use function Livewire\Volt\{state};
state(['count' => 0]);
$increment = fn() => $this->count++;
?>
<button wire:click="increment">{{ $count }}</button><input wire:model.blur="email">
<input wire:model.live.debounce.300ms="search">
<button wire:click="save" wire:loading.attr="disabled">Save</button>