feat(api): add ownedByCurrentTeamAPI scope to Environment model
This commit is contained in:
parent
d5b3a0380c
commit
63008fceb3
1 changed files with 5 additions and 0 deletions
|
|
@ -42,6 +42,11 @@ public static function ownedByCurrentTeam()
|
|||
return Environment::whereRelation('project.team', 'id', currentTeam()->id)->orderBy('name');
|
||||
}
|
||||
|
||||
public static function ownedByCurrentTeamAPI(int $teamId)
|
||||
{
|
||||
return Environment::whereRelation('project.team', 'id', $teamId)->orderBy('name');
|
||||
}
|
||||
|
||||
public function isEmpty()
|
||||
{
|
||||
return $this->applications()->count() == 0 &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue