trait HasCollection (View source)

Properties

static protected TCollection>> $resolvedCollectionClasses

The resolved collection class names by model.

Methods

TCollection
newCollection(array $models = [])

Create a new Eloquent Collection instance.

TCollection>|null
resolveCollectionFromAttribute()

Resolve the collection class name from the CollectedBy attribute.

Details

TCollection newCollection(array $models = [])

Create a new Eloquent Collection instance.

Parameters

array $models

Return Value

TCollection

TCollection>|null resolveCollectionFromAttribute()

Resolve the collection class name from the CollectedBy attribute.

Return Value

TCollection>|null

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.