mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 22:03:44 +02:00
New models for node and location admin pages.
This commit is contained in:
@@ -226,4 +226,24 @@ class Node extends Model
|
||||
{
|
||||
return $this->hasOne(Location::class, 'id', 'location_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the servers associated with a node.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function servers()
|
||||
{
|
||||
return $this->hasMany(Server::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the allocations associated with a node.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
*/
|
||||
public function allocations()
|
||||
{
|
||||
return $this->hasMany(Allocation::class);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user