October\Rain\Database\Concerns\HasEagerLoadAttachRelation

Overview

HasEagerLoadAttachRelation eagerly loads all attachments on a model in one pass. Since they share a common type and database table, multiple attachment definitions can be eagerly loaded as a single query.


Protected Properties

protected array $eagerLoadAttachResultCache


Protected Methods

protected eagerLoadAttachRelation()

protected eagerLoadAttachRelation(
    string $relatedModel,
    array $models,
    string $name
): array|null 

eagerLoadAttachRelation eagerly loads an attachment relationship on a set of models.