Select with role
I want to select only the users with the role 'Adherant' , but I always end up having all the roles ('Admin', 'Member', 'Adherant') , what's wrong with this code ?
1 Reply
You can also pass the adherent role condition as the third parameter to
->relationship()
method.
Docs: https://filamentphp.com/docs/3.x/forms/fields/select#customizing-the-relationship-query
If you want to change the option labels, you may use: getOptionLabelFromRecordUsing
.
Docs: https://filamentphp.com/docs/3.x/forms/fields/select#customizing-the-option-labels-for-each-morphed-type