Fix zone update with zt_id, added some ZeroTier network settings
This commit is contained in:
@@ -35,11 +35,15 @@ class ZoneController extends Controller
|
||||
})
|
||||
],
|
||||
'system_id' => 'required|exists:systems,id',
|
||||
'ztid' => 'nullable|size:10|regex:/^([A-Fa-f0-9]){10}$/',
|
||||
'zt_id' => 'nullable|size:10|regex:/^([A-Fa-f0-9]){10}$/',
|
||||
'zt_ipv4' => 'nullable|ipv4',
|
||||
'zt_ipv4_mask' => 'nullable|numeric|lte:31',
|
||||
'zt_ipv6' => 'nullable|ipv6',
|
||||
'zt_ipv6_mask' => 'nullable|numeric|lte:112',
|
||||
'active' => 'required|boolean',
|
||||
]);
|
||||
|
||||
foreach (['zone_id','domain_id','system_id','active','notes','ztid'] as $key)
|
||||
foreach (['zone_id','domain_id','system_id','active','notes','zt_id','zt_ipv4','zt_ipv4_mask','zt_ipv6','zt_ipv6_mask'] as $key)
|
||||
$o->{$key} = $request->post($key);
|
||||
|
||||
$o->save();
|
||||
|
@@ -10,6 +10,16 @@ class Zone extends Model
|
||||
{
|
||||
use ScopeActive;
|
||||
|
||||
/* SCOPES */
|
||||
|
||||
public function scopeDomainZoneOrder($query)
|
||||
{
|
||||
return $query
|
||||
->join('domains',['domains.id'=>'zones.domain_id'])
|
||||
->orderBy('domains.name')
|
||||
->orderBy('zone_id');
|
||||
}
|
||||
|
||||
/* RELATIONS */
|
||||
|
||||
public function addresses()
|
||||
|
Reference in New Issue
Block a user