Create a new has many relationship instance.
public __construct ( |
||
$query | ||
$parent | ||
$foreignKey | string | |
return | void |
/** * Create a new has many relationship instance. * * @param \LMongo\Eloquent\Builder $query * @param \LMongo\Eloquent\Model $parent * @param string $foreignKey * @param string $otherKey * @return void */ public function __construct(Builder $query, Model $parent, $foreignKey, $otherKey) { $this->otherKey = $otherKey; $this->foreignKey = $foreignKey; parent::__construct($query, $parent, $foreignKey); }
/** * Create a new has many relationship instance. * * @param \LMongo\Eloquent\Builder $query * @param \LMongo\Eloquent\Model $parent * @param string $type * @param string $id * @return void */ public function __construct(Builder $query, Model $parent, $type, $id) { $this->morphType = $type; $this->morphClass = get_class($parent); parent::__construct($query, $parent, $id); }