CollectsResources
trait CollectsResources (View source)
Properties
| static protected array<class-string, class-string|false> | $cachedCollectsAttributes | The cached Collects attribute values. |
Methods
Map the given collection resource into its individual resources.
Get the resource that this resource collects.
Get the JSON serialization options that should be applied to the resource response.
Get an iterator for the resource collection.
Details
protected mixed
collectResource(mixed $resource)
Map the given collection resource into its individual resources.
protected JsonResource>|null
collects()
Get the resource that this resource collects.
int
jsonOptions()
Get the JSON serialization options that should be applied to the resource response.
Traversable
getIterator()
Get an iterator for the resource collection.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.