diff --git a/app/Http/Controllers/Admin/ServiceController.php b/app/Http/Controllers/Admin/ServiceController.php index c61919220..dc5977470 100644 --- a/app/Http/Controllers/Admin/ServiceController.php +++ b/app/Http/Controllers/Admin/ServiceController.php @@ -181,7 +181,11 @@ class ServiceController extends Controller // Because of the way old() works on the display side we prefix all of the variables with thier ID // We need to remove that prefix here since the repo doesn't want it. - $data = []; + $data = [ + 'user_viewable' => '0', + 'user_editable' => '0', + 'required' => '0' + ]; foreach($request->except(['_token']) as $id => $val) { $data[str_replace($variable.'_', '', $id)] = $val; } diff --git a/app/Repositories/ServiceRepository/Variable.php b/app/Repositories/ServiceRepository/Variable.php index 0ea372f45..154a8b061 100644 --- a/app/Repositories/ServiceRepository/Variable.php +++ b/app/Repositories/ServiceRepository/Variable.php @@ -101,9 +101,9 @@ class Variable 'description' => 'sometimes|required|string', 'env_variable' => 'sometimes|required|regex:/^[\w]{1,255}$/', 'default_value' => 'sometimes|string|max:255', - 'user_viewable' => 'sometimes|required|numeric|size:1', - 'user_editable' => 'sometimes|required|numeric|size:1', - 'required' => 'sometimes|required|numeric|size:1', + 'user_viewable' => 'sometimes|required|numeric|boolean', + 'user_editable' => 'sometimes|required|numeric|boolean', + 'required' => 'sometimes|required|numeric|boolean', 'regex' => 'sometimes|required|string|min:1' ]);