diff --git a/app/Models/Address.php b/app/Models/Address.php index 4b77897..b844a61 100644 --- a/app/Models/Address.php +++ b/app/Models/Address.php @@ -60,7 +60,7 @@ class Address extends Model /* SCOPES */ - public function scopeActive($query) + public function scopeActiveFTN($query) { return $query->select($this->getTable().'.*') ->join('zones',['zones.id'=>'addresses.zone_id']) @@ -378,6 +378,7 @@ class Address extends Model * @param string $address * @param bool $create * @param System|null $so + * @param bool $trashed * @return Address|null * @throws \Exception */ @@ -388,6 +389,9 @@ class Address extends Model // Are we looking for a region address if (($ftn['f'] === 0) && $ftn['p'] === 0) { $o = (new self) + ->select('addresses.*') + ->join('zones',['zones.id'=>'addresses.zone_id']) + ->join('domains',['domains.id'=>'zones.domain_id']) ->when($trashed,function($query) { $query->trashed(); },function($query) { @@ -416,6 +420,9 @@ class Address extends Model } $o = (new self) + ->select('addresses.*') + ->join('zones',['zones.id'=>'addresses.zone_id']) + ->join('domains',['domains.id'=>'zones.domain_id']) ->when($trashed,function($query) { $query->trashed(); },function($query) { diff --git a/resources/views/pkt.blade.php b/resources/views/pkt.blade.php index 8094a17..726e900 100644 --- a/resources/views/pkt.blade.php +++ b/resources/views/pkt.blade.php @@ -60,7 +60,7 @@ @foreach($results as $item) @foreach ($item as $file => $result)