Merge pull request #8078 from dmeltzer/wrong-id

Fix incorrectly named parameter.
This commit is contained in:
snipe 2020-05-26 19:51:38 -07:00 committed by GitHub
commit dee1f5ec35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,10 +96,10 @@ class ManufacturersController extends Controller
$this->authorize('update', Manufacturer::class);
// Check if the manufacturer exists
if (!$item = Manufacturer::find($id)) {
if (!$item = Manufacturer::find($manufacturerId)) {
return redirect()->route('manufacturers.index')->with('error', trans('admin/manufacturers/message.does_not_exist'));
}
// Show the page
return view('manufacturers/edit', compact('item'));
}
@ -131,7 +131,7 @@ class ManufacturersController extends Controller
$manufacturer->support_url = $request->input('support_url');
$manufacturer->support_phone = $request->input('support_phone');
$manufacturer->support_email = $request->input('support_email');
// Set the model's image property to null if the image is being deleted
if ($request->input('image_delete') == 1) {
$manufacturer->image = null;