Laravel API ResourceColection не работает

use App\Http\Resources\ProductCollection;
use App\Http\Resources\ProductResource;
// for single collection resource in   
return new ProductCollection(Product::all()); //or
return ProductResource::collection(Product::all());
//for single resource
return new ProductResource(Product::findOrFail($id));
gerson ondangan