diff --git a/app/Http/Controllers/MainController.php b/app/Http/Controllers/MainController.php
index 0a1a08c..7547001 100644
--- a/app/Http/Controllers/MainController.php
+++ b/app/Http/Controllers/MainController.php
@@ -121,11 +121,18 @@ class MainController extends Controller
return redirect('/login');
}
- public function singleProduct()
+ public function singleProduct($id)
{
- return view('singleProduct');
+ $products = Products::find($id);
+
+ if (!$products) {
+ abort(404);
+ }
+
+ return view('singleProduct', compact('products'));
}
+
public function blogDetails()
{
return view('blogDetails');
diff --git a/resources/views/about.blade.php b/resources/views/about.blade.php
index 0569ba6..b718dad 100644
--- a/resources/views/about.blade.php
+++ b/resources/views/about.blade.php
@@ -215,29 +215,3 @@