Support images and multipart requests

This commit is contained in:
Petri Asikainen 2021-06-29 14:25:20 +03:00
parent b49733832c
commit b0aa26e6cb
2 changed files with 2 additions and 2 deletions

View file

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

View file

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