예제 #1
0
 public function productApi($slug)
 {
     $product = Product::whereSlug($slug)->first();
     return response()->json(['product' => $product]);
 }