You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 and populateGroups plus group creation in saveGroupsOrPermissions) 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?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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