/** * Create a new Relation instance. * * @param \Vinelab\NeoEloquent\Eloquent\Builder $query * @param \Vinelab\NeoEloquent\Eloquent\Model $parent * @param \Vinelab\NeoEloquent\Eloquent\Model $related * @param string $type */ public function __construct(Builder $query, Model $parent, Model $related, $type, $attributes = array(), $unique = false) { parent::__construct($query); $this->type = $type; $this->parent = $parent; $this->related = $related; $this->unique = $unique; $this->attributes = $attributes; $this->finder = $this->newFinder(); $this->initRelation(); }
/** * Create a new Finder instance. * * @param \Vinelab\NeoEloquent\Eloquent\Builder $query * @param \Vinelab\NeoEloquent\Eloquent\Model $parent * @param \Vinelab\NeoEloquent\Eloquent\Model $related * @param string $type */ public function __construct(Builder $query) { parent::__construct($query); }