LMongo\Query\Builder::whereGeoWithin PHP Method

whereGeoWithin() public method

Add an "$geoWithin geospatial operation" clause to logical operation.
public whereGeoWithin ( string $column, string $shape, array $coords, string $boolean = 'first' ) : LMongo\Query\Builder
$column string
$shape string
$coords array
$boolean string
return LMongo\Query\Builder
    public function whereGeoWithin($column, $shape, array $coords, $boolean = 'first')
    {
        if ('$' == $shape[0]) {
            $value = array('$geoWithin' => array($shape => $coords));
        } else {
            $value = array('$geoWithin' => array('$geometry' => array('type' => $shape, 'coordinates' => $coords)));
        }
        return $this->where($column, $value, $boolean);
    }
Builder