update change ip gateway

This commit is contained in:
2020-10-22 11:06:01 +07:00
parent f65c064f04
commit ad885eacd2
3 changed files with 22 additions and 1 deletions

View File

@@ -251,11 +251,13 @@ class DeviceController extends Controller {
"OldIPAddress" => $OldIpAddress,
"NewIPAddress" => $data["Ip"],
"NetMask" => $data["SubnetMask"],
"GATEIPAddress" => $data["Gateway"],
"MAC" => $model->mac_address
]);
if ($res == 0) {
$model->ip_address = $data["Ip"];
$model->subnet_mask = $data["SubnetMask"];
$model->gateway = $data["Gateway"];
$model->save();
return ["status" => true];
}