mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Support images and multipart requests
This commit is contained in:
parent
b49733832c
commit
b0aa26e6cb
|
@ -82,7 +82,7 @@ class DepartmentsController extends Controller
|
|||
$this->authorize('create', Department::class);
|
||||
$department = new Department;
|
||||
$department->fill($request->all());
|
||||
$department = $request->handleImages($department)
|
||||
$department = $request->handleImages($department);
|
||||
|
||||
$department->user_id = Auth::user()->id;
|
||||
$department->manager_id = ($request->filled('manager_id' ) ? $request->input('manager_id') : null);
|
||||
|
|
|
@ -107,7 +107,7 @@ class ManufacturersController extends Controller
|
|||
$this->authorize('update', Manufacturer::class);
|
||||
$manufacturer = Manufacturer::findOrFail($id);
|
||||
$manufacturer->fill($request->all());
|
||||
$manufacturer = $request->handleImages($manufacturer)
|
||||
$manufacturer = $request->handleImages($manufacturer);
|
||||
|
||||
if ($manufacturer->save()) {
|
||||
return response()->json(Helper::formatStandardApiResponse('success', $manufacturer, trans('admin/manufacturers/message.update.success')));
|
||||
|
|
Loading…
Reference in a new issue