trait HasRelated (View source)

Properties

protected $relatedCache

Methods

MorphMany
relatedItems()

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

Collection
getRelated(string $browser_name)

Returns the related items for a browser field.

Collection
loadRelated(string $browser_name)

Eager load related items for a browser field.

void
saveRelated(array $items, string $browser_name)

Attach items to the model for a browser field.

void
clearRelated($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 $browser_name)

Returns the related items for a browser field.

Parameters

string $browser_name

Return Value

Collection

Collection loadRelated(string $browser_name)

Eager load related items for a browser field.

Parameters

string $browser_name

Return Value

Collection

void saveRelated(array $items, string $browser_name)

Attach items to the model for a browser field.

Parameters

array $items
string $browser_name

Return Value

void

void clearRelated($browserName)

No description

Parameters

$browserName

Return Value

void

void clearAllRelated()

No description

Return Value

void