diff --git a/app/Models/Address.php b/app/Models/Address.php index 703fcbb..0de732c 100644 --- a/app/Models/Address.php +++ b/app/Models/Address.php @@ -395,7 +395,8 @@ class Address extends Model */ 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([ 'zone:zones.id,domain_id,zone_id', 'zone.domain:domains.id,name', @@ -602,9 +603,13 @@ class Address extends Model public function nodes_hub(): HasMany { return $this->hasMany(Address::class,'hub_id','id') - ->FTN() + ->select(['id','addresses.zone_id','host_id','node_id','point_id','system_id']) ->active() - ->FTNorder(); + ->FTNorder() + ->with([ + 'zone:zones.id,domain_id,zone_id', + 'zone.domain:domains.id,name', + ]); } /**