LMongo\Eloquent\Relations\BelongsToMany::__construct PHP Method

__construct() public method

Create a new has many relationship instance.
public __construct ( Builder $query, Model $parent, string $foreignKey, string $otherKey ) : void
$query LMongo\Eloquent\Builder
$parent LMongo\Eloquent\Model
$foreignKey string
$otherKey string
return void
    public function __construct(Builder $query, Model $parent, $foreignKey, $otherKey)
    {
        $this->otherKey = $otherKey;
        $this->foreignKey = $foreignKey;
        parent::__construct($query, $parent, $foreignKey);
    }