Skip to content

Commit ac8214f

Browse files
committed
feat: Create function to get single product details
1 parent bc36d75 commit ac8214f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/Http/Controllers/ProductController.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,11 @@ public function store(Request $request)
2525

2626
return response()->json('Product created!');
2727
}
28+
29+
/* function to get single product detail */
30+
public function show($id)
31+
{
32+
$product = Product::find($id);
33+
return response()->json($product);
34+
}
2835
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy