Model updates for Database Management in ACP

This commit is contained in:
Dane Everitt
2017-02-03 15:19:14 -05:00
parent 9c2d34d6e6
commit 96d3aa767f
7 changed files with 137 additions and 43 deletions

View File

@@ -59,4 +59,14 @@ class DatabaseServer extends Model
'server_id' => 'integer',
'db_server' => 'integer',
];
/**
* Gets the node associated with a database host.
*
* @return \Illuminate\Database\Eloquent\Relations\HasOne
*/
public function node()
{
return $this->hasOne(Node::class, 'id', 'linked_node');
}
}