F
Filament16mo ago
Awady

how can i show/hide filter according to another filter ?

SelectFilter::make('class') ->options(function () { return ParticipationClass::get()->pluck('name', 'id')->toArray(); })->query(function (Builder $query, $data): Builder { if (!empty($data['value'])) { dd($data); $data = ParticipationClass::find($data['value']); $participants = $data->participants->pluck('id'); return $query->wherein('relatable_id', $participants); } return $query; }) ->visible(function (): bool { //todo }), ---------------------------------------------------------------------------------------------------------- -this is my code i need to get another filter value inside visible closure to show hide filter according to this boolean .
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server