app/Http/Controllers/ProductController.php
// add show function to show single item
add show function to show single item
add show function to show single item
public function show($id){
        $product = Product::find($id);
        if($product == null){
            return response()->json("Product Item Not Found");    
        }
        return response()->json($product);
    }
public function show ( $ id ) { $ product = Product :: find ( $ id ) ; if ( $ product == null ) { return response ( ) -> json ( " Product Item Not Found " ) ; } return response ( ) -> json ( $ product ) ; }
add show function to show single item
add show function to show single item