diff --git a/app/Http/Controllers/ProductController.php b/app/Http/Controllers/ProductController.php index ba23265..3b5e68d 100644 --- a/app/Http/Controllers/ProductController.php +++ b/app/Http/Controllers/ProductController.php @@ -62,10 +62,17 @@ class ProductController extends Controller * Show a specified Product * * @param (int) $id The product id + * + * @return \Illuminate\Http\Response */ public function show($id) { $product = Product::fromAuthUser()->find($id); + + if (!$product) { + return back(); + + } return view('product.show', compact('product')); } }