Tailor\Classes\Relations\CustomFieldHasManyRelation

Overview

CustomFieldHasManyRelation adds a field name to has many

Extends
Implements
  • Illuminate\Contracts\Database\Eloquent\Builder
  • Illuminate\Contracts\Database\Query\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

There are no protected properties in the class.

Show inherited protected properties

Inherited Protected Properties

  • $foreignKey - The foreign key of the parent model. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • $localKey - The local key of the parent model. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • $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)
  • $relationName - is the "name" of the relationship. (defined in October\Rain\Database\Relations\HasMany)

Public Methods

public addConstraints()

public addConstraints(): void

addConstraints on the relation query.

public addEagerConstraints()

public addEagerConstraints($models): void

addEagerConstraints for an eager load of the relation.

public getRelationExistenceQuery()

public getRelationExistenceQuery(
    $query,
    $parentQuery,
    $columns = [ 0 => '*']
): void

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)
  • __construct() - a new has many relationship instance. (defined in October\Rain\Database\Relations\HasMany)
  • add() - a model to this relationship type. (defined in October\Rain\Database\Relations\HasMany)
  • addDefinedConstraints() - to the relation query. (defined in October\Rain\Database\Relations\HasMany)
  • addDefinedConstraintsToQuery() - (defined in October\Rain\Database\Relations\HasMany)
  • addDefinedConstraintsToRelation() - (defined in October\Rain\Database\Relations\HasMany)
  • addMany() - attaches an array of models to the parent instance with deferred binding support. (defined in October\Rain\Database\Relations\HasMany)
  • create() - a new instance of this related model with deferred binding support. (defined in October\Rain\Database\Relations\HasMany)
  • createMany() - Create a Collection of new instances of the related model. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • createManyQuietly() - Create a Collection of new instances of the related model without raising any events to the parent model. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • createQuietly() - Create a new instance of the related model without raising any events to the parent model. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • createdAt() - Get the name of the "created at" column. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • enforceMorphMap() - Define the morph map for polymorphic relations and require all morphed models to be explicitly mapped. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • findOrNew() - Find a model by its primary key or return a new instance of the related model. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • firstOrCreate() - Get the first related record matching the attributes or create it. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • firstOrNew() - Get the first related model record matching the attributes or instantiate it. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • flushMacros() - Flush the existing macros. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • forceCreate() - Create a new instance of the related model. Allow mass-assignment. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • get() - Execute the query as a "select" statement. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • 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)
  • getExistenceCompareKey() - Get the key for comparing against the parent key in "has" query. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • getForeignKey() - (defined in October\Rain\Database\Relations\HasMany)
  • getForeignKeyName() - Get the plain foreign key. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • getLocalKeyName() - Get the local key for the relationship. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • getMorphedModel() - Get the model associated with a custom polymorphic type. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • getOtherKey() - (defined in October\Rain\Database\Relations\HasMany)
  • getParent() - Get the parent model of the relation. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • getParentKey() - Get the key value of the parent's local key. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • getQualifiedForeignKeyName() - Get the foreign key for the relationship. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • getQualifiedParentKeyName() - Get the fully qualified parent key name. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • 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)
  • getRelatedKeyName() - (defined in October\Rain\Database\Relations\HasMany)
  • 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)
  • getRelationExistenceQueryForSelfRelation() - Add the constraints for a relationship query on the same table. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • getResults() - Get the results of the relationship. (defined in Illuminate\Database\Eloquent\Relations\HasMany)
  • getSimpleValue() - helper for getting this relationship simple value, (defined in October\Rain\Database\Relations\HasMany)
  • 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\HasMany)
  • 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)
  • make() - Create and return an un-saved instance of the related model. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • makeMany() - Create and return an un-saved instance of the related models. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • match() - Match the eagerly loaded results to their parents. (defined in Illuminate\Database\Eloquent\Relations\HasMany)
  • matchMany() - Match the eagerly loaded results to their many parents. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • matchOne() - Match the eagerly loaded results to their single parents. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • 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)
  • noConstraints() - Run a callback with constraints disabled on the relation. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • 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)
  • remove() - a model from this relationship type. (defined in October\Rain\Database\Relations\HasMany)
  • 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)
  • save() - the supplied related model with deferred binding support. (defined in October\Rain\Database\Relations\HasMany)
  • saveMany() - is an alias for the addMany() method. (defined in October\Rain\Database\Relations\HasMany)
  • saveManyQuietly() - Attach a collection of models to the parent instance without raising any events to the parent model. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • saveQuietly() - Attach a model instance without raising any events to the parent model. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • setSimpleValue() - helper for setting this relationship using various expected. (defined in October\Rain\Database\Relations\HasMany)
  • sole() - Execute the query and get the first result if it's the sole matching record. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • 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\HasOneOrMany)
  • updatedAt() - Get the name of the "updated at" column. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • withDeferred() - returns a new model query with deferred bindings added, this. (defined in October\Rain\Database\Relations\HasMany)
  • withDeferredQuery() - returns the supplied model query, or current model query, with. (defined in October\Rain\Database\Relations\HasMany)

Protected Methods

protected setForeignAttributesForCreate()

protected setForeignAttributesForCreate($model): void

setForeignAttributesForCreate a related model.

Show inherited protected methods

Inherited Protected Methods

  • buildDictionary() - Build model dictionary keyed by the relation's foreign key. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • buildMorphMapFromModels() - Builds a table-keyed array from model class names. (defined in Illuminate\Database\Eloquent\Relations\Relation)
  • ensureRelationIsEmpty() - ensures the relation is empty, either deleted or nulled. (defined in October\Rain\Database\Relations\HasMany)
  • 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)
  • getDictionaryKey() - Get a dictionary key attribute - casting it to a string if necessary. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • 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)
  • getRelationValue() - Get the value of a relationship by one or many type. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • getWithDeferredQualifiedKeyName() - returns the related "slave id" key. (defined in October\Rain\Database\Relations\HasMany)
  • isModelRemovable() - returns true if an existing model is already associated. (defined in October\Rain\Database\Relations\HasMany)
  • matchOneOrMany() - Match the eagerly loaded results to their many parents. (defined in Illuminate\Database\Eloquent\Relations\HasOneOrMany)
  • 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)