trait HasRelated (View source)

Properties

protected array $relatedCache

Methods

MorphMany
relatedItems()

Defines the one-to-many relationship for related items.

Collection
getRelated(string $browserName)

Returns the related items for a browser field.

mixed
getFirstRelated(string $browserName)

No description

Collection
loadRelated(string $browserName)

Eager load related items for a browser field.

void
saveRelated(Collection $items, string $browserName)

Attach items to the model for a browser field.

void
clearRelated(string $browserName)

No description

void
clearAllRelated()

No description

Details

MorphMany relatedItems()

Defines the one-to-many relationship for related items.

Return Value

MorphMany

Collection getRelated(string $browserName)

Returns the related items for a browser field.

Parameters

string $browserName

Return Value

Collection

mixed getFirstRelated(string $browserName)

No description

Parameters

string $browserName

Return Value

mixed

Collection loadRelated(string $browserName)

Eager load related items for a browser field.

Parameters

string $browserName

Return Value

Collection

void saveRelated(Collection $items, string $browserName)

Attach items to the model for a browser field.

Parameters

Collection $items
string $browserName

Return Value

void

void clearRelated(string $browserName)

No description

Parameters

string $browserName

Return Value

void

void clearAllRelated()

No description

Return Value

void