How implement a filter in a filament resource that uses the attribute of a HasOne relationship

Hello everyone. I have a question, how can I implement a filter in a filament resource that uses the attribute of a HasOne relationship. For example, I have two models Author and Profile, where Author hasOne Profile and Profile belongsTo Author. In profile there is the boolean attribute is_featured. What I want is to filter the list of authors by that attribute. I tried TernaryFilter::make('profile.is_featured') but it shows me all the authors.
1 Reply
Want results from more Discord servers?
Add your server