diff --git a/app/Http/Controllers/ProductController.php b/app/Http/Controllers/ProductController.php index 39c299b..81da593 100644 --- a/app/Http/Controllers/ProductController.php +++ b/app/Http/Controllers/ProductController.php @@ -71,7 +71,7 @@ class ProductController extends Controller if (!$product) { session()->flash('danger', "The product doesn't exist or doesn't belongs to you."); - return back(); + return redirect('/product'); } return view('product.show', compact('product')); }