mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -08:00
Set dept manager ID for dept
This commit is contained in:
parent
bb323db685
commit
cefb20d46f
|
@ -60,6 +60,7 @@ class DepartmentsController extends Controller
|
||||||
$department = new Department;
|
$department = new Department;
|
||||||
$department->fill($request->all());
|
$department->fill($request->all());
|
||||||
$department->user_id = Auth::user()->id;
|
$department->user_id = Auth::user()->id;
|
||||||
|
$department->manager_id = ($request->has('manager_id' ) ? $request->input('manager_id') : null);
|
||||||
|
|
||||||
if ($department->save()) {
|
if ($department->save()) {
|
||||||
return response()->json(Helper::formatStandardApiResponse('success', $department, trans('admin/departments/message.create.success')));
|
return response()->json(Helper::formatStandardApiResponse('success', $department, trans('admin/departments/message.create.success')));
|
||||||
|
|
Loading…
Reference in a new issue