An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
feat(api): add ownedByCurrentTeamAPI scope to Environment model
Niklas Wichter63008fceb3d7
diff --git a/app/Models/Environment.php b/app/Models/Environment.phpindex d4e614e6ee..ae027a5858 100644--- a/app/Models/Environment.php+++ b/app/Models/Environment.php@@ -42,6 +42,11 @@ class Environment extends BaseModelreturn 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 &&