/** * Create a new has many relationship instance. * @return void */ public function __construct(Builder $query, Model $farParent, Model $parent, $firstKey, $secondKey, $relationName = null) { $this->relationName = $relationName; parent::__construct($query, $farParent, $parent, $firstKey, $secondKey); }
/** * Create a new has many through relationship instance. * * @param \Illuminate\Database\Eloquent\Builder $query * @param \Illuminate\Database\Eloquent\Model $farParent * @param \Illuminate\Database\Eloquent\Model $parent * @param string $firstKey * @param string $secondKey * @param string $localKey * @param string $outwardKey * @override */ public function __construct(Builder $query, Model $farParent, Model $parent, $firstKey, $secondKey, $localKey, $outwardKey) { $this->outwardKey = $outwardKey; parent::__construct($query, $farParent, $parent, $firstKey, $secondKey, $localKey); }
/** * Create a new has many relationship instance. * @return void */ public function __construct(Builder $query, Model $farParent, Model $parent, $firstKey, $secondKey, $localKey, $relationName = null) { $this->relationName = $relationName; parent::__construct($query, $farParent, $parent, $firstKey, $secondKey, $localKey); $this->addDefinedConstraints(); }