From 2e88c51ac7b7a0c1a5b481fe5e5ffc01c61612f7 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 30 Sep 2016 16:01:36 -0400 Subject: [PATCH] If value is empty set to null --- app/Http/Controllers/Admin/NodesController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Admin/NodesController.php b/app/Http/Controllers/Admin/NodesController.php index 26051081e..097354834 100644 --- a/app/Http/Controllers/Admin/NodesController.php +++ b/app/Http/Controllers/Admin/NodesController.php @@ -176,7 +176,7 @@ class NodesController extends Controller try { $update = Models\Allocation::findOrFail($request->input('allocation')); - $update->ip_alias = $request->input('alias'); + $update->ip_alias = (empty($request->input('alias'))) ? null : $request->input('alias'); $update->save(); return response('', 204);