/home/techb158/exp.abdallabala.com/vendor/illuminate/database/Eloquent/Relations
NameSizeModeActions
Concerns/-0755rm
BelongsTo.php107910644editdlrm
BelongsToMany.php306400644editdlrm
HasMany.php11750644editdlrm
HasManyThrough.php184890644editdlrm
HasOne.php17670644editdlrm
HasOneOrMany.php115600644editdlrm
HasOneThrough.php21290644editdlrm
MorphMany.php11790644editdlrm
MorphOne.php18480644editdlrm
MorphOneOrMany.php31090644editdlrm
MorphPivot.php37720644editdlrm
MorphTo.php87870644editdlrm
MorphToMany.php52440644editdlrm
Pivot.php4550644editdlrm
Relation.php101110644editdlrm
Edit: /home/techb158/exp.abdallabala.com/vendor/illuminate/database/Eloquent/Relations/MorphOneOrMany.php (3109B)
morphType = $type; $this->morphClass = $parent->getMorphClass(); parent::__construct($query, $parent, $id, $localKey); } /** * Set the base constraints on the relation query. * * @return void */ public function addConstraints() { if (static::$constraints) { parent::addConstraints(); $this->query->where($this->morphType, $this->morphClass); } } /** * Set the constraints for an eager load of the relation. * * @param array $models * @return void */ public function addEagerConstraints(array $models) { parent::addEagerConstraints($models); $this->query->where($this->morphType, $this->morphClass); } /** * Set the foreign ID and type for creating a related model. * * @param \Illuminate\Database\Eloquent\Model $model * @return void */ protected function setForeignAttributesForCreate(Model $model) { $model->{$this->getForeignKeyName()} = $this->getParentKey(); $model->{$this->getMorphType()} = $this->morphClass; } /** * Get the relationship query. * * @param \Illuminate\Database\Eloquent\Builder $query * @param \Illuminate\Database\Eloquent\Builder $parentQuery * @param array|mixed $columns * @return \Illuminate\Database\Eloquent\Builder */ public function getRelationExistenceQuery(Builder $query, Builder $parentQuery, $columns = ['*']) { return parent::getRelationExistenceQuery($query, $parentQuery, $columns)->where( $query->qualifyColumn($this->getMorphType()), $this->morphClass ); } /** * Get the foreign key "type" name. * * @return string */ public function getQualifiedMorphType() { return $this->morphType; } /** * Get the plain morph type name without the table. * * @return string */ public function getMorphType() { return last(explode('.', $this->morphType)); } /** * Get the class name of the parent model. * * @return string */ public function getMorphClass() { return $this->morphClass; } }