If value is empty set to null

This commit is contained in:
Dane Everitt 2016-09-30 16:01:36 -04:00
parent 181b1d1cd7
commit 2e88c51ac7
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
1 changed files with 1 additions and 1 deletions

View File

@ -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);