diff --git a/app/Models/Service.php b/app/Models/Service.php index ce676f63e..09aa88a3e 100644 --- a/app/Models/Service.php +++ b/app/Models/Service.php @@ -90,6 +90,10 @@ class Service extends BaseModel { return $this->hasMany(EnvironmentVariable::class)->orderBy('key', 'asc'); } + public function environment_variables_preview(): HasMany + { + return $this->hasMany(EnvironmentVariable::class)->where('is_preview', true)->orderBy('key', 'asc'); + } public function workdir() { return service_configuration_dir() . "/{$this->uuid}";