Implemented hide AKA, Minor Node::class changes, other fixes

This commit is contained in:
Deon George
2021-08-14 16:14:22 +10:00
parent 569201e972
commit 4048289cf3
7 changed files with 86 additions and 35 deletions

View File

@@ -63,9 +63,12 @@ class ZoneController extends Controller
$o->{$key} = $request->post($key);
$o->save();
$zo = Zone::where('zone_id',$request->zone_id)
->where('domain_id',$request->domain_id)
->singleOrFail();
// Find the zones 0/0 address, and assign it to this host.
$ao = Address::where('zone_id',$request->zone_id)
$ao = Address::where('zone_id',$zo->id)
->where('region_id',0)
->where('host_id',0)
->where('node_id',0)
@@ -76,6 +79,7 @@ class ZoneController extends Controller
if (! $ao) {
$ao = new Address;
$ao->forceFill([
'zone_id'=>$zo->id,
'region_id'=>0,
'host_id'=>0,
'node_id'=>0,