Find the best Rector rule to solve your problem. Searching through 671 rules.
Found 2 rules:
Converts the computed methods of a Livewire component to use the Computed Attribute
use Livewire\Component;
class MyComponent extends Component
{
- public function getFooBarProperty()
+ #[\Livewire\Attributes\Computed]
+ public function fooBar()
{
}
}
Converts the $queryString property of a Livewire component to use the Url Attribute
use Livewire\Component;
class MyComponent extends Component
{
+ #[\Livewire\Attributes\Url]
public string $something = '';
+ #[\Livewire\Attributes\Url]
public string $another = '';
-
- protected $queryString = [
- 'something',
- 'another',
- ];
}