allow setting variable options to "0", closes #87

This commit is contained in:
Dane Everitt 2016-09-17 20:25:13 -04:00
parent 812b869be8
commit d9f1a7faf7
2 changed files with 8 additions and 4 deletions

View file

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