FilamentF
Filament12mo ago
frame

Query string null in a relationmanager

I can read request()->query('group') in ViewUser::getTitle just fine but in UserResource's ResultsRelationManager it returns null.

Is there a way to read URL query strings in a relationmanager, or some other way to pass data from Resource to Relationmanager? I need to alter both UserResource infolist and the ResultsRelationManager table under it based on this query string. 🤔
Solution
in your relation manager if you would add property $group and set it as Url livewire attribute. does it work then?
use Livewire\Attributes\Url;

#[Url]
public int|null $group = null;


and call it where needed like $this->group then
Was this page helpful?