RelationManager associate users
Hello, i have a UsersRelationManager and i would like to be able to only associate users with the group_id field null, so i dont steal a user from another organization.
How would that be possible?
8 Replies
The
AssociateAction
should have a method to filter the options I think. Or at least to modify the underlying select.Tables\Actions\AssociateAction::make()
->options(User::where('group_id', null))
->disableAssociateAnother()
->preloadRecordSelect(),
something like this?
you shouldnt need to modify it
we will only list users without a group anyway I think
my "Group" is as of organization
?
Group has many users, it lists all users expect those from the group im editing
did the job, i think you wrote the name of the variable instead of the function name