Sorting Forms/Components/Select by Pivot Table Field
Maybe someone would like to help me.
1️⃣ I have a Person model that has a relationship to the Operator model 2️⃣ The Operator model has a relationship to the Roles model 3️⃣ I have a Select component in Form and it works fine with these relationship operator.roles. How could he sort the returns Roles in Select by Pivot Table ID?
1️⃣ I have a Person model that has a relationship to the Operator model 2️⃣ The Operator model has a relationship to the Roles model 3️⃣ I have a Select component in Form and it works fine with these relationship operator.roles. How could he sort the returns Roles in Select by Pivot Table ID?
7 Replies
Could anyone help me? 🙂
You can use modifyQueryUsing: https://filamentphp.com/docs/3.x/forms/fields/select#customizing-the-relationship-query
I tried and it didn't work.
And it doesn't work either