diff --git a/app/Models/Environment.php b/app/Models/Environment.php index d4e614e6e..ae027a585 100644 --- a/app/Models/Environment.php +++ b/app/Models/Environment.php @@ -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 &&