Expand accounts page.

This commit is contained in:
James Cole
2024-04-20 16:18:41 +02:00
parent 850e47d8db
commit bd7fe92818
22 changed files with 484 additions and 239 deletions

View File

@@ -295,4 +295,15 @@ class UserGroupRepository implements UserGroupRepositoryInterface
$this->user->user_group_id = $userGroup->id;
$this->user->save();
}
#[\Override] public function getMembershipsFromGroupId(int $groupId): Collection
{
return $this->user->groupMemberships()->where('user_group_id', $groupId)->get();
}
#[\Override] public function getById(int $id): ?UserGroup
{
return UserGroup::find($id);
}
}

View File

@@ -36,8 +36,12 @@ interface UserGroupRepositoryInterface
{
public function destroy(UserGroup $userGroup): void;
public function getMembershipsFromGroupId(int $groupId): Collection;
public function get(): Collection;
public function getById(int $id): ?UserGroup;
public function getAll(): Collection;
public function setUser(null|Authenticatable|User $user): void;