API for piggies + groups.

This commit is contained in:
James Cole
2020-06-21 18:28:51 +02:00
parent 0dbee47182
commit 00440f282b
6 changed files with 112 additions and 7 deletions

View File

@@ -21,6 +21,15 @@ trait CreatesObjectGroups
return $this->user->objectGroups()->where('title', $title)->first();
}
/**
* @param int $groupId
*
* @return ObjectGroup|null
*/
protected function findObjectGroupById(int $groupId): ?ObjectGroup
{
return $this->user->objectGroups()->where('id', $groupId)->first();
}
/**
* @param User $user