修复后台商品 update 方法抛异常,返回 route 错误

This commit is contained in:
pushuo 2022-12-30 16:17:58 +08:00
parent 70b2d83682
commit f07e511256
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ class ProductController extends Controller
(new ProductService)->update($product, $request->all());
return redirect()->to($this->getRedirect())->with('success', trans('common.updated_success'));
} catch (\Exception $e) {
return redirect(admin_route('product.edit', $product))->withErrors(['error' => $e->getMessage()]);
return redirect(admin_route('products.edit', $product))->withErrors(['error' => $e->getMessage()]);
}
}