mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 14:14:52 +00:00
wip
This commit is contained in:
1 parent
e7763f3b73
commit
00a8c847e9
17 files changed
+621
-2
No files matched your search
@@ -2,6 +2,9 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Spatie\SchemalessAttributes\Casts\SchemalessAttributes;
|
||||
|
||||
class Server extends BaseModel
|
||||
{
|
||||
protected static function booted()
|
||||
@@ -12,10 +15,21 @@ class Server extends BaseModel
|
||||
]);
|
||||
});
|
||||
}
|
||||
|
||||
public $casts = [
|
||||
'extra_attributes' => SchemalessAttributes::class,
|
||||
];
|
||||
|
||||
public function scopeWithExtraAttributes(): Builder
|
||||
{
|
||||
return $this->extra_attributes->modelScope();
|
||||
}
|
||||
|
||||
public function privateKey()
|
||||
{
|
||||
return $this->belongsTo(PrivateKey::class);
|
||||
}
|
||||
|
||||
public function settings()
|
||||
{
|
||||
return $this->hasOne(ServerSetting::class);
|
||||
|
||||
Reference in new issue
Block a user