Level 102
Not an expert but did you read the upgrade guide? https://laravel-livewire.com/docs/2.x/upgrading#query-string
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
After updating from livewire 1.X to 2.X the following piece of code doesn't work anymore:
switch (request()->query('filter', null)) {
case 'affiliate':
$this->authorize('view', AffiliateTransaction::class);
$transactions = AffiliateTransaction::with(['user:id,name', 'order:id', ])->latest();
break;
case 'vendor':
$this->authorize('view', VendorTransaction::class);
$transactions = VendorTransaction::latest();
break;
//request to view general transactions for orders
default:
$this->authorize('view', GeneralTransactions::class);
$transactions = GeneralTransactions::with(['order:id'])->latest();
Using v1the request()->query('filter') will be up to date all the time.
Using v2 the query will be set to null, after submitting the form the second time.
Any livewire experts here?
Please or to participate in this conversation.