From cefb20d46f2e5bb53e0e7766aed6dd773f5c410a Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 23 May 2017 02:46:25 -0700 Subject: [PATCH] Set dept manager ID for dept --- app/Http/Controllers/Api/DepartmentsController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/Api/DepartmentsController.php b/app/Http/Controllers/Api/DepartmentsController.php index 9fd298dd73..1d1e1a60ce 100644 --- a/app/Http/Controllers/Api/DepartmentsController.php +++ b/app/Http/Controllers/Api/DepartmentsController.php @@ -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')));