
Livewire | Laravel Livewire
Say hello to Livewire. Hi Livewire! Livewire is a full-stack framework for Laravel that makes building dynamic interfaces simple, without leaving the comfort of Laravel. Consider my interest piqued. It's not like anything you've seen before. The best way to understand it is to just look at the code. Strap on your snorkel, we're diving in.
Installation | Laravel Livewire
You're browsing the documentation for an old version of Livewire. Consider upgrading your project to Livewire 3.x.
Quickstart | Laravel Livewire
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Events | Laravel Livewire
Livewire components can communicate with each other through a global event system. As long as two Livewire components are living on the same page, they can communicate using events and listeners. Firing Events. There are multiple ways to fire events from Livewire components. Method A: From The Template
Reference | Laravel Livewire
Get the first Livewire component's JS object on the page: Livewire.find(componentId) Get a Livewire component by it's ID: Livewire.all() Get all the Livewire components on a page: Livewire.directive(directiveName, (el, directive, component) => {}) Register a new Livewire directive (wire:custom-directive) Livewire.hook(hookName, (...) => {})
File Uploads | Laravel Livewire
Testing file uploads in Livewire is simple with Laravel's file upload testing helpers. Here's a complete example of testing the "UploadPhoto" component with Livewire.
Installation | Livewire Screencasts | Laravel Livewire
Installing Livewire is so simple, this 2.5 minute video feels like overkill. Composer require, and two little lines added to your layout file, and you are fully set up and ready to rumble!
Polling | Laravel Livewire
Livewire offers a directive called wire:poll that, when added to an element, will refresh the component every 2s. Polling for changes over Ajax is a lightweight, simpler alternative to something like Laravel Echo, Pusher, or any WebSocket strategy.
AlpineJS | Laravel Livewire
From any Alpine component inside a Livewire component, you can access a magic $wire object to access and manipulate the Livewire component. To demonstrate its usage, we'll create a "counter" component in Alpine that uses Livewire completely under the hood:
Making Components | Laravel Livewire
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.