Why selectColumn is not working
Hi i am using the plugin Shield, and i want in mine resource User to be able to change role. I made custom Role model which extends Spatie model, and i added a relationship to the user. Mine problem is that select column is not recognize mine relationship or something like that also i can not add default value for the select column. User model User table
5 Replies
I am not using the default relationship roles because i want to be able to edit the role in table
I think, it should be many to many relationship in to table model_has_roles. Anyway, if you just want a user has only a role, you may do this and set role_id in user table to make relationship. Doing that you should not use Shield, it totally different design.
I already did that, user have in table users role_id, what i am trying to do is when comes to the change i will delete all user roles that he has and add it new
But that is not mine problem it is problem why selectColumn is not working, why it does not show the value
If you click edit is it then selectable? Since when viewing it is a readonly
I found the solution it is
I just have to find method that is similar to beforeUpdate