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