Replies: 1 comment
-
I would suggest not altering the original table and creating your own table which references that one. Then take a look at whichever class is responsible for creating the groups and alter its code to trigger an Event whenever a group is altered and capture that event and update your table accordingly OR if you don't want to deal with events just modify the group alteration methods to also modify your particular table. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Table for groups has user_id, name of group and created_at timestamp. I want to remove the created_at column and add one that would store id of admin who added user to the group.
I extended
GroupModel
and changed$allowedFields
but the old Model is hardcoded in private function of Authorizable trait (saveGroups
andpopulateGroups
plus group creation insaveGroupsOrPermissions
) which are used by the whole file.I tried to create my own trait to override the original one, but got its declaration was incompatible the original ones due to return type self.
Copying the edited trait into my User Entity worked but is there better way to do it?
Beta Was this translation helpful? Give feedback.
All reactions