Geekshop - 404 Error
Hi Admin,
I have a problem regarding 404 error, I made and error file same as you mentioned "located at resources/views/errors/ then add a new file called 404.blade.php". But why its not working for "Category, product and page"
Like its working on this link "https://www.offily.com/show-me-error" but not on this link "https://www.offily.com/product/show-me-error"
How I can fix this ...
Ok, It should be showing the 404 page now :)
I've updated this in your controller as well and will include it in the next release.
Instead of using this:
$product = Product::where('slug', '=', $slug)->where('active', '=', 1)->first();
In the app/Http/Controllers/ProductController.php
, it should have been this:
$product = Product::where('slug', '=', $slug)->where('active', '=', 1)->firstOrFail();
So, if it doesn't find the product it will fail and return a 404, instead of a 500.
Hope that helps.
Thanks for letting me know about that issue :D