diff --git a/app/Http/Controllers/DomainController.php b/app/Http/Controllers/DomainController.php index 26c8f22..3dfcb14 100644 --- a/app/Http/Controllers/DomainController.php +++ b/app/Http/Controllers/DomainController.php @@ -66,7 +66,7 @@ class DomainController extends Controller { $oo = Address::where('role',self::NODE_NC) ->where('zone_id',$o->id) - ->when($region,function($query,$region) { return $query->where('region_id',$region)->where('node_id','<>',0); }) + ->when($region,function($query,$region) { return $query->where('region_id',$region)->where('node_id',0); }) ->when((! $region),function($query) use ($region) { return $query->where('region_id',0); }) ->where('point_id',0) ->FTNorder() diff --git a/resources/views/system/addedit.blade.php b/resources/views/system/addedit.blade.php index 204c571..6fab553 100644 --- a/resources/views/system/addedit.blade.php +++ b/resources/views/system/addedit.blade.php @@ -169,7 +169,7 @@ use App\Http\Controllers\DomainController as DC;
- @foreach ($o->addresses->sortBy(['region_id','host_id']) as $oo) + @foreach ($o->addresses->sortBy(function($item) { return sprintf('%04x%04x%04x%04x%04x',$item->zone->zone_id,$item->region_id,$item->host_id,$item->node_id,$item->point_id); }) as $oo)