Add system_id when listing AKAs, so that we can reference the system relation.
This commit is contained in:
parent
7bd192980f
commit
8b4e2cb9f0
@ -395,7 +395,8 @@ class Address extends Model
|
|||||||
*/
|
*/
|
||||||
public function scopeFTN($query)
|
public function scopeFTN($query)
|
||||||
{
|
{
|
||||||
return $query->select(['id','addresses.zone_id','host_id','node_id','point_id'])
|
return $query
|
||||||
|
->select(['id','addresses.zone_id','host_id','node_id','point_id','system_id'])
|
||||||
->with([
|
->with([
|
||||||
'zone:zones.id,domain_id,zone_id',
|
'zone:zones.id,domain_id,zone_id',
|
||||||
'zone.domain:domains.id,name',
|
'zone.domain:domains.id,name',
|
||||||
@ -602,9 +603,13 @@ class Address extends Model
|
|||||||
public function nodes_hub(): HasMany
|
public function nodes_hub(): HasMany
|
||||||
{
|
{
|
||||||
return $this->hasMany(Address::class,'hub_id','id')
|
return $this->hasMany(Address::class,'hub_id','id')
|
||||||
->FTN()
|
->select(['id','addresses.zone_id','host_id','node_id','point_id','system_id'])
|
||||||
->active()
|
->active()
|
||||||
->FTNorder();
|
->FTNorder()
|
||||||
|
->with([
|
||||||
|
'zone:zones.id,domain_id,zone_id',
|
||||||
|
'zone.domain:domains.id,name',
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user