https://livewire.laravel.com is a fantastic package for creating interactive interfaces in a Laravel app. Using Livewire, you can write component classes that define interactive behavior.

We will work with a straightforward Livewire component to search for quotes in the database. Here's what that component could look like: namespace App\Http\Livewire; use App\Models\Quote; use Illuminate\Support\Collection; use Livewire\Component; class SearchComponent extends Component { public string $searchingFor = ''; public function render() { return view('livewire.search', [ 'quotes' => $this->getQuotes()]); } public function getQuotes(): Collection { if (empty($this->searchingFor)) { return collect(); } return Quote::search($this->searchingFor); }}

public function render() { ray($this->searchingFor); return view('livewire.search', [ 'quotes' => $this->getQuotes()]); }
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners