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