mirror of
https://github.com/coollabsio/coolify.git
synced 2026-06-14 03:19:51 +00:00
30751a60df
Use `$this->mainServer` when resolving environment variable values across deployment env generation (runtime, buildtime, nixpacks, args, and secrets hash) so shared server-scoped values are applied consistently. Also add `server_id` to `SharedEnvironmentVariable::$fillable` and normalize the Livewire Blade file newline.
56 lines
974 B
PHP
56 lines
974 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class SharedEnvironmentVariable extends Model
|
|
{
|
|
protected $fillable = [
|
|
// Core identification
|
|
'key',
|
|
'value',
|
|
'comment',
|
|
|
|
// Type and relationships
|
|
'type',
|
|
'team_id',
|
|
'project_id',
|
|
'environment_id',
|
|
'server_id',
|
|
|
|
// Boolean flags
|
|
'is_multiline',
|
|
'is_literal',
|
|
'is_shown_once',
|
|
|
|
// Metadata
|
|
'version',
|
|
];
|
|
|
|
protected $casts = [
|
|
'key' => 'string',
|
|
'value' => 'encrypted',
|
|
];
|
|
|
|
public function team()
|
|
{
|
|
return $this->belongsTo(Team::class);
|
|
}
|
|
|
|
public function project()
|
|
{
|
|
return $this->belongsTo(Project::class);
|
|
}
|
|
|
|
public function environment()
|
|
{
|
|
return $this->belongsTo(Environment::class);
|
|
}
|
|
|
|
public function server()
|
|
{
|
|
return $this->belongsTo(Server::class);
|
|
}
|
|
}
|