app/Http/Controllers/APIProductController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $product = Product::all();
        return response()->json(['data'=> $product], 200);
    }
public function index ( ) { $ product = Product :: all ( ) ; return response ( ) -> json ( [ 'data' => $ product ] , 200 ) ; }
Display a listing of the resource.
Display a listing of the resource .