mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -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->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')));
|
||||
|
|
Loading…
Reference in a new issue