public function __construct(Builder $query, Model $parent, $foreignKey, $otherKey, $relation) { $this->otherKey = $otherKey; $this->relation = $relation; $this->foreignKey = $foreignKey; parent::__construct($query, $parent); }
public function __construct(Builder $query, Model $parent, $foreignKey, $otherKey, $relationName) { $this->relationName = $relationName; parent::__construct($query, $parent, $foreignKey, $otherKey, $relationName); }