mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 06:13:45 +02:00
Use belongsTo versus hasOne when more logical.
This commit is contained in:
@@ -63,10 +63,10 @@ class DatabaseServer extends Model
|
||||
/**
|
||||
* Gets the node associated with a database host.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function node()
|
||||
{
|
||||
return $this->hasOne(Node::class, 'id', 'linked_node');
|
||||
return $this->belongsTo(Node::class, 'linked_node');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user