SelectFilter doesn't working

I have a table named 'clothes' and a column named 'mark', so i can't figure it out why it's not working. I don't know if I should use relationship, a query, if I should create an enum, 'cause Mark won't never change, I'm very confused, still learning
No description
Solution:
I solved the problem! I only add a ->relationship('clothes', 'mark') and it worked...
Jump to solution
3 Replies
nanopanda
nanopanda4w ago
The name passed to make() should be the column name. See below in the docs. Also, options() expects an array, so if you have an enum you may need a method to convert the cases like this: public static function filterOptions(): array { return array_column(self::cases(), "value", "name"); } "Select filters do not require a custom query() method. The column name used to scope the query is the name of the filter. To customize this, you may use the attribute() method:"
raissa_black
raissa_black4w ago
I did like this, did I make it right as you said? Still don't filtering
No description
Solution
raissa_black
raissa_black4w ago
I solved the problem! I only add a ->relationship('clothes', 'mark') and it worked
Want results from more Discord servers?
Add your server