Fixed assetmodels upload

This commit is contained in:
snipe 2020-08-26 02:29:37 -07:00
parent 53c46ac8de
commit de21f00771
No known key found for this signature in database
GPG key ID: 10BFFDA3ED34B5AC

View file

@ -85,7 +85,7 @@ class AssetModelsController extends Controller
$model->fieldset_id = e($request->input('custom_fieldset'));
}
$model = $request->handleImages($model,600, public_path().'/uploads/models');
$model = $request->handleImages($model,600,null,null, public_path().'/uploads/models');
// Was it created?
if ($model->save()) {
@ -143,6 +143,8 @@ class AssetModelsController extends Controller
return redirect()->route('models.index')->with('error', trans('admin/models/message.does_not_exist'));
}
$model = $request->handleImages($model);
$model->depreciation_id = $request->input('depreciation_id');
$model->eol = $request->input('eol');
$model->name = $request->input('name');
@ -152,6 +154,8 @@ class AssetModelsController extends Controller
$model->notes = $request->input('notes');
$model->requestable = $request->input('requestable', '0');
$this->removeCustomFieldsDefaultValues($model);
if ($request->input('custom_fieldset')=='') {
@ -164,7 +168,6 @@ class AssetModelsController extends Controller
}
}
$model = $request->handleImages($model,600, public_path().'/uploads/models');
if ($model->save()) {
return redirect()->route("models.index")->with('success', trans('admin/models/message.update.success'));