Select make on attribute that is an array

Hello, I have an attribute that is returning an array of enumerator. the field is called roles. i am trying to create a Form with a Select::make('roles')->options(Role::all())->multiple(). the Role::all() is not a model it is an Enumerator with a static method all() that returns the cases of the Role enum. the roles attribute on the model is using casts to convert a csv value like this admin,student convert it to ['Role::Admin','Role::Student'] when i am accessing the $user->roles. I am not getting any value showing in the select.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server