Set dept manager ID for dept

This commit is contained in:
snipe 2017-05-23 02:46:25 -07:00
parent bb323db685
commit cefb20d46f

View file

@ -60,6 +60,7 @@ class DepartmentsController extends Controller
$department = new Department;
$department->fill($request->all());
$department->user_id = Auth::user()->id;
$department->manager_id = ($request->has('manager_id' ) ? $request->input('manager_id') : null);
if ($department->save()) {
return response()->json(Helper::formatStandardApiResponse('success', $department, trans('admin/departments/message.create.success')));