feat: required envs

This commit is contained in:
Andras Bacsai committed 2024-10-11 14:38:22 +02:00
1 parent ca2d946064
commit 88f1e58c63
9 files changed
+214 -128

No files matched your search

+8 -1
View File
@@ -44,7 +44,7 @@ class EnvironmentVariable extends Model
'version' => 'string',
];
protected $appends = ['real_value', 'is_shared'];
protected $appends = ['real_value', 'is_shared', 'is_really_required'];
protected static function booted()
{
@@ -130,6 +130,13 @@ class EnvironmentVariable extends Model
);
}
protected function isReallyRequired(): Attribute
{
return Attribute::make(
get: fn () => $this->is_required && str($this->real_value)->isEmpty(),
);
}
protected function isShared(): Attribute
{
return Attribute::make(