ابنِ مكون بحث عالي الأداء.
المكون
use Livewire\Attributes\Url;
class SearchProducts extends Component
{
#[Url]
public string $query = '';
}القالب
<input type="search" wire:model.live.debounce.300ms="query">
@foreach(Product::search($query)->get() as $p)
<div>{{ $p->name }}</div>
@endforeach