/**
  * 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, $relationName = null)
 {
     $this->relationName = $relationName;
     parent::__construct($query, $farParent, $parent, $firstKey, $secondKey);
 }
 /**
  * Get the qualified foreign key on the "through" model.
  *
  * @return string
  * @static
  */
 public static function getThroughKey()
 {
     return \Illuminate\Database\Eloquent\Relations\HasManyThrough::getThroughKey();
 }
Beispiel #4
0
 /**
  * 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();
 }
 protected function setJoin(EloquentBuilder $query = null)
 {
     $query = $query ?: $this->query;
     return parent::setJoin($query instanceof EloquentBuilder ? $query->getQuery() : $query);
 }