October\Rain\Database\Relations\HasOneThrough

Extends
  • Illuminate\Database\Eloquent\Relations\HasOneThrough
  • Illuminate\Database\Eloquent\Relations\HasManyThrough
  • Illuminate\Database\Eloquent\Relations\Relation
Implements
  • Illuminate\Contracts\Database\Query\Builder
  • Illuminate\Contracts\Database\Eloquent\Builder

Public Properties

There are no public properties in the class.

Show inherited public properties

Inherited Public Properties

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

Protected Properties

protected string $relationName

The "name" of the relationship.

Show inherited protected properties

Inherited Protected Properties

  • $throughParent - The "through" parent model instance. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • $farParent - The far parent model instance. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • $firstKey - The near key on the relationship. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • $secondKey - The far key on the relationship. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • $localKey - The local key on the relationship. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • $secondLocalKey - The local key on the intermediary model. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • $query - The Eloquent query builder instance. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • $parent - The parent model instance. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • $related - The related model instance. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • $constraints - Indicates if the relation is adding constraints. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • $requireMorphMap - Prevents morph relationships without a morph map. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • $selfJoinCount - The count of self joins. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • $macros - The registered string macros. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • $withDefault - Indicates if a default model instance should be used. (defined in Illuminate\Database\Eloquent\Relations\HasOneThrough)

Public Methods

public __construct()

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

__construct a new has many relationship instance.

public addDefinedConstraints()

public addDefinedConstraints(): void 

addDefinedConstraints to the relation query

public addDefinedConstraintsToQuery()

public addDefinedConstraintsToQuery($query, $args = null): void

public addDefinedConstraintsToRelation()

public addDefinedConstraintsToRelation($relation, $args = null): void

public parentSoftDeletes()

public parentSoftDeletes(): bool 

parentSoftDeletes determines whether close parent of the relation uses Soft Deletes.

Show inherited public methods

Inherited Public Methods

  • __call() - Handle dynamic method calls to the relationship. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • __callStatic() - Dynamically handle calls to the class. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • __clone() - Force a clone of the underlying query builder when cloning. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • addConstraints() - Set the base constraints on the relation query. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • addEagerConstraints() - Set the constraints for an eager load of the relation. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • chunk() - Chunk the results of the query. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • chunkById() - Chunk the results of a query by comparing numeric IDs. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • createdAt() - Get the name of the "created at" column. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • cursor() - Get a generator for the given query. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • cursorPaginate() - Paginate the given query into a cursor paginator. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • each() - Execute a callback over each item while chunking. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • enforceMorphMap() - Define the morph map for polymorphic relations and require all morphed models to be explicitly mapped. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • find() - Find a related model by its primary key. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • findMany() - Find multiple related models by their primary keys. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • findOr() - Find a related model by its primary key or call a callback. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • findOrFail() - Find a related model by its primary key or throw an exception. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • first() - Execute the query and get the first related model. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • firstOr() - Execute the query and get the first result or call a callback. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • firstOrFail() - Execute the query and get the first result or throw an exception. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • firstOrNew() - Get the first related model record matching the attributes or instantiate it. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • firstWhere() - Add a basic where clause to the query, and return the first result. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • flushMacros() - Flush the existing macros. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • get() - Execute the query as a "select" statement. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • getBaseQuery() - Get the base query builder driving the Eloquent builder. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • getEager() - Get the relationship for eager loading. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • getFirstKeyName() - Get the foreign key on the "through" model. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • getForeignKeyName() - Get the foreign key on the related model. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • getLocalKeyName() - Get the local key on the far parent model. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • getMorphedModel() - Get the model associated with a custom polymorphic type. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • getParent() - Get the parent model of the relation. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • getQualifiedFarKeyName() - Get the qualified foreign key on the related model. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • getQualifiedFirstKeyName() - Get the qualified foreign key on the "through" model. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • getQualifiedForeignKeyName() - Get the qualified foreign key on the related model. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • getQualifiedLocalKeyName() - Get the qualified local key on the far parent model. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • getQualifiedParentKeyName() - Get the fully qualified parent key name. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • getQuery() - Get the underlying query for the relation. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • getRelated() - Get the related model of the relation. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • getRelationCountHash() - Get a relationship join table hash. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • getRelationExistenceCountQuery() - Add the constraints for a relationship count query. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • getRelationExistenceQuery() - Add the constraints for a relationship query. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • getRelationExistenceQueryForSelfRelation() - Add the constraints for a relationship query on the same table. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • getRelationExistenceQueryForThroughSelfRelation() - Add the constraints for a relationship query on the same table as the through parent. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • getResults() - Get the results of the relationship. (defined in Illuminate\Database\Eloquent\Relations\HasOneThrough)
  • getSecondLocalKeyName() - Get the local key on the intermediary model. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • hasMacro() - Checks if macro is registered. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • initRelation() - Initialize the relation on a set of models. (defined in Illuminate\Database\Eloquent\Relations\HasOneThrough)
  • lazy() - Query lazily, by chunks of the given size. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • lazyById() - Query lazily, by chunking the results of a query by comparing IDs. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • macro() - Register a custom macro. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • macroCall() - Dynamically handle calls to the class. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • match() - Match the eagerly loaded results to their parents. (defined in Illuminate\Database\Eloquent\Relations\HasOneThrough)
  • mixin() - Mix another object into the class. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • morphMap() - Set or get the morph map for polymorphic relations. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • newRelatedInstanceFor() - Make a new related instance for the given model. (defined in Illuminate\Database\Eloquent\Relations\HasOneThrough)
  • noConstraints() - Run a callback with constraints disabled on the relation. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • paginate() - Get a paginator for the "select" statement. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • rawUpdate() - Run a raw update against the base query. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • relatedUpdatedAt() - Get the name of the related model's "updated at" column. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • requireMorphMap() - Prevent polymorphic relationships from being used without model mappings. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • requiresMorphMap() - Determine if polymorphic relationships require explicit model mapping. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • simplePaginate() - Paginate the given query into a simple paginator. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • sole() - Execute the query and get the first result if it's the sole matching record. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • throughParentSoftDeletes() - Determine whether "through" parent of the relation uses Soft Deletes. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • toBase() - Get a base query builder instance. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • touch() - Touch all of the related models for the relationship. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • updateOrCreate() - Create or update a related record matching the attributes, and fill it with values. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • updatedAt() - Get the name of the "updated at" column. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • withDefault() - Return a new model instance in case the relationship does not exist. (defined in Illuminate\Database\Eloquent\Relations\HasOneThrough)
  • withTrashedParents() - Indicate that trashed "through" parents should be included in the query. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)

Protected Methods

Show inherited protected methods

Inherited Protected Methods

  • buildDictionary() - Build model dictionary keyed by the relation's foreign key. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • buildMorphMapFromModels() - Builds a table-keyed array from model class names. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • forwardCallTo() - Forward a method call to the given object. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • forwardDecoratedCallTo() - Forward a method call to the given object, returning $this if the forwarded call returned itself. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • getDefaultFor() - Get the default value for this relation. (defined in Illuminate\Database\Eloquent\Relations\HasOneThrough)
  • getDictionaryKey() - Get a dictionary key attribute - casting it to a string if necessary. (defined in Illuminate\Database\Eloquent\Relations\HasOneThrough)
  • getKeys() - Get all of the primary keys for an array of models. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • getRelationQuery() - Get the query builder that will contain the relationship constraints. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • performJoin() - Set the join clause on the query. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • prepareQueryBuilder() - Prepare the query builder for query execution. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • shouldSelect() - Set the select clause for the relation query. (defined in Illuminate\Database\Eloquent\Relations\HasManyThrough)
  • throwBadMethodCallException() - Throw a bad method call exception for the given method. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • whereInMethod() - Get the name of the "where in" method for eager loading. (defined in Illuminate\Database\Eloquent\Relations\Relation)