يمكن لـ Livewire v4 مزامنة الخصائص مع سلاسل استعلام URL.
الاستخدام الأساسي
use Livewire\Attributes\Url;
use Livewire\Component;
class ProductList extends Component
{
#[Url]
public string $search = '';
#[Url(as: 'page')]
public int $currentPage = 1;
#[Url(history: true)]
public string $tab = 'overview';
}نتيجة URL
/products?search=laptop&page=2&tab=reviews