October\Rain\Database\Relations\HasManyThrough

Source: ~/vendor/october/rain/src/Database/Relations/HasManyThrough.php

Extends:

  • Illuminate\Database\Eloquent\Relations\HasManyThrough
  • Illuminate\Database\Eloquent\Relations\Relation

Public properties

There are no public properties in the class.

Show inherited public properties

Inherited public properties

  • public static array $morphMap - defined in Illuminate\Database\Eloquent\Relations\Relation. An array to map class names to their morph names in database.

Protected properties

protected string $relationName

The "name" of the relationship.

Show inherited protected properties

Inherited protected properties

  • protected Illuminate\Database\Eloquent\Model $throughParent - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. The "through" parent model instance.
  • protected Illuminate\Database\Eloquent\Model $farParent - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. The far parent model instance.
  • protected string $firstKey - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. The near key on the relationship.
  • protected string $secondKey - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. The far key on the relationship.
  • protected string $localKey - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. The local key on the relationship.
  • protected string $secondLocalKey - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. The local key on the intermediary model.
  • protected static int $selfJoinCount - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. The count of self joins.
  • protected Illuminate\Database\Eloquent\Builder $query - defined in Illuminate\Database\Eloquent\Relations\Relation. The Eloquent query builder instance.
  • protected Illuminate\Database\Eloquent\Model $parent - defined in Illuminate\Database\Eloquent\Relations\Relation. The parent model instance.
  • protected Illuminate\Database\Eloquent\Model $related - defined in Illuminate\Database\Eloquent\Relations\Relation. The related model instance.
  • protected static bool $constraints - defined in Illuminate\Database\Eloquent\Relations\Relation. Indicates if the relation is adding constraints.
  • protected static array $macros - defined in Illuminate\Database\Eloquent\Relations\Relation. The registered string macros.

Public methods

public void __construct($query, $farParent, $parent, $firstKey, $secondKey, $localKey, $secondLocalKey, $relationName=NULL)

Create a new has many relationship instance.

Parameters
  • $query
  • $farParent
  • $parent
  • $firstKey
  • $secondKey
  • $localKey
  • $secondLocalKey
  • $relationName

public void addDefinedConstraints()

Set the defined constraints on the relation query.

public void addDefinedConstraintsToQuery(October\Rain\Database\QueryBuilder $query, array $args=NULL)

Add query based constraints.

Parameters

public void addDefinedConstraintsToRelation(Illuminate\Database\Eloquent\Relations\Relation $relation, array $args=NULL)

Add relation based constraints.

Parameters
  • Illuminate\Database\Eloquent\Relations\Relation $relation
  • array $args

public bool parentSoftDeletes()

Determine whether close parent of the relation uses Soft Deletes.

Show inherited public methods

Inherited public methods

  • public mixed __call(string $method, array $parameters) - defined in Illuminate\Database\Eloquent\Relations\Relation. Handle dynamic method calls to the relationship.
  • public static mixed __callStatic(string $method, array $parameters) - defined in Illuminate\Database\Eloquent\Relations\Relation. Dynamically handle calls to the class.
  • public void __clone() - defined in Illuminate\Database\Eloquent\Relations\Relation. Force a clone of the underlying query builder when cloning.
  • public void addConstraints() - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Set the base constraints on the relation query.
  • public void addEagerConstraints(array $models) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Set the constraints for an eager load of the relation.
  • public string createdAt() - defined in Illuminate\Database\Eloquent\Relations\Relation. Get the name of the "created at" column.
  • public Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|null find(mixed $id, array $columns=array( 0=>'*')) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Find a related model by its primary key.
  • public Illuminate\Database\Eloquent\Collection findMany(mixed $ids, array $columns=array( 0=>'*')) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Find multiple related models by their primary keys.
  • public Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection findOrFail(mixed $id, array $columns=array( 0=>'*')) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Find a related model by its primary key or throw an exception.
  • public mixed first(array $columns=array( 0=>'*')) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Execute the query and get the first related model.
  • public Illuminate\Database\Eloquent\Model|static firstOrFail(array $columns=array( 0=>'*')) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Execute the query and get the first result or throw an exception.
  • public Illuminate\Database\Eloquent\Model firstOrNew(array $attributes) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Get the first related model record matching the attributes or instantiate it.
  • public Illuminate\Database\Eloquent\Collection get(array $columns=array( 0=>'*')) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Execute the query as a "select" statement.
  • public Illuminate\Database\Query\Builder getBaseQuery() - defined in Illuminate\Database\Eloquent\Relations\Relation. Get the base query builder driving the Eloquent builder.
  • public Illuminate\Database\Eloquent\Collection getEager() - defined in Illuminate\Database\Eloquent\Relations\Relation. Get the relationship for eager loading.
  • public static string|null getMorphedModel(string $alias) - defined in Illuminate\Database\Eloquent\Relations\Relation. Get the model associated with a custom polymorphic type.
  • public Illuminate\Database\Eloquent\Model getParent() - defined in Illuminate\Database\Eloquent\Relations\Relation. Get the parent model of the relation.
  • public string getQualifiedFarKeyName() - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Get the qualified foreign key on the related model.
  • public string getQualifiedFirstKeyName() - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Get the qualified foreign key on the "through" model.
  • public string getQualifiedForeignKeyName() - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Get the qualified foreign key on the related model.
  • public string getQualifiedLocalKeyName() - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Get the qualified local key on the far parent model.
  • public string getQualifiedParentKeyName() - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Get the fully qualified parent key name.
  • public Illuminate\Database\Eloquent\Builder getQuery() - defined in Illuminate\Database\Eloquent\Relations\Relation. Get the underlying query for the relation.
  • public Illuminate\Database\Eloquent\Model getRelated() - defined in Illuminate\Database\Eloquent\Relations\Relation. Get the related model of the relation.
  • public string getRelationCountHash() - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Get a relationship join table hash.
  • public Illuminate\Database\Eloquent\Builder getRelationExistenceCountQuery(Illuminate\Database\Eloquent\Builder $query, Illuminate\Database\Eloquent\Builder $parentQuery) - defined in Illuminate\Database\Eloquent\Relations\Relation. Add the constraints for a relationship count query.
  • public Illuminate\Database\Eloquent\Builder getRelationExistenceQuery(Illuminate\Database\Eloquent\Builder $query, Illuminate\Database\Eloquent\Builder $parentQuery, array|mixed $columns=array( 0=>'*')) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Add the constraints for a relationship query.
  • public Illuminate\Database\Eloquent\Builder getRelationExistenceQueryForSelfRelation(Illuminate\Database\Eloquent\Builder $query, Illuminate\Database\Eloquent\Builder $parentQuery, array|mixed $columns=array( 0=>'*')) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Add the constraints for a relationship query on the same table.
  • public mixed getResults() - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Get the results of the relationship.
  • public static bool hasMacro(string $name) - defined in Illuminate\Database\Eloquent\Relations\Relation. Checks if macro is registered.
  • public array initRelation(array $models, string $relation) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Initialize the relation on a set of models.
  • public static void macro(string $name, object|callable $macro) - defined in Illuminate\Database\Eloquent\Relations\Relation. Register a custom macro.
  • public mixed macroCall(string $method, array $parameters) - defined in Illuminate\Database\Eloquent\Relations\Relation. Dynamically handle calls to the class.
  • public array match(array $models, Illuminate\Database\Eloquent\Collection $results, string $relation) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Match the eagerly loaded results to their parents.
  • public static void mixin(object $mixin) - defined in Illuminate\Database\Eloquent\Relations\Relation. Mix another object into the class.
  • public static array morphMap(array|null $map=NULL, bool $merge=true) - defined in Illuminate\Database\Eloquent\Relations\Relation. Set or get the morph map for polymorphic relations.
  • public static mixed noConstraints(Closure $callback) - defined in Illuminate\Database\Eloquent\Relations\Relation. Run a callback with constraints disabled on the relation.
  • public Illuminate\Contracts\Pagination\LengthAwarePaginator paginate(int $perPage=NULL, array $columns=array( 0=>'*'), string $pageName='page', int $page=NULL) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Get a paginator for the "select" statement.
  • public int rawUpdate(array $attributes=array()) - defined in Illuminate\Database\Eloquent\Relations\Relation. Run a raw update against the base query.
  • public string relatedUpdatedAt() - defined in Illuminate\Database\Eloquent\Relations\Relation. Get the name of the related model's "updated at" column.
  • public Illuminate\Contracts\Pagination\Paginator simplePaginate(int $perPage=NULL, array $columns=array( 0=>'*'), string $pageName='page', int|null $page=NULL) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Paginate the given query into a simple paginator.
  • public bool throughParentSoftDeletes() - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Determine whether "through" parent of the relation uses Soft Deletes.
  • public void touch() - defined in Illuminate\Database\Eloquent\Relations\Relation. Touch all of the related models for the relationship.
  • public Illuminate\Database\Eloquent\Model updateOrCreate(array $attributes, array $values=array()) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Create or update a related record matching the attributes, and fill it with values.
  • public string updatedAt() - defined in Illuminate\Database\Eloquent\Relations\Relation. Get the name of the "updated at" column.

Protected methods

Show inherited protected methods

Inherited protected methods

  • protected array buildDictionary(Illuminate\Database\Eloquent\Collection $results) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Build model dictionary keyed by the relation's foreign key.
  • protected static array|null buildMorphMapFromModels(array $models=NULL) - defined in Illuminate\Database\Eloquent\Relations\Relation. Builds a table-keyed array from model class names.
  • protected array getKeys(array $models, string $key=NULL) - defined in Illuminate\Database\Eloquent\Relations\Relation. Get all of the primary keys for an array of models.
  • protected void performJoin(Illuminate\Database\Eloquent\Builder|null $query=NULL) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Set the join clause on the query.
  • protected array shouldSelect(array $columns=array( 0=>'*')) - defined in Illuminate\Database\Eloquent\Relations\HasManyThrough. Set the select clause for the relation query.