mirror of
https://github.com/brunofontes/shareit.git
synced 2024-11-23 20:10:52 +00:00
Invalid product now redirect to Products.index page
This commit is contained in:
parent
aebffe304f
commit
cb0c43ba0b
@ -71,7 +71,7 @@ class ProductController extends Controller
|
|||||||
|
|
||||||
if (!$product) {
|
if (!$product) {
|
||||||
session()->flash('danger', "The product doesn't exist or doesn't belongs to you.");
|
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'));
|
return view('product.show', compact('product'));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user