Select Filter with nested relation won't filter
If we use a direct relationship the select filter works
Nested relations provide the correct dropdown options but does not filter the results
If try to add a query or ->modifyQueryUsing $data array is never populated.
Also tried to create direct relation on the model like this but throws an error
Solution:Jump to solution
Found the problem. the Select filter name needs to be the attribute name like this:-
```php
public static function productCategoryFilter($relationship = 'product.productCategory'){
return SelectFilter::make('product_category_id')...
2 Replies