mirror of
https://github.com/tiennm99/coolify.git
synced 2026-05-13 00:58:06 +00:00
Add Service
This commit is contained in:
@@ -12,5 +12,9 @@ class Environment extends BaseModel
|
||||
{
|
||||
return $this->hasMany(Database::class);
|
||||
}
|
||||
public function services()
|
||||
{
|
||||
return $this->hasMany(Service::class);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
|
||||
class Service extends BaseModel
|
||||
{
|
||||
public function environment()
|
||||
{
|
||||
return $this->belongsTo(Environment::class);
|
||||
}
|
||||
public function destination()
|
||||
{
|
||||
return $this->morphTo();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user