Skip to content

Problems using $geoNear #965

Closed
Closed
@guicunha

Description

@guicunha

i make a simple raw and don't understand where are the wrong

$proximos = Perfil::raw(function($collection)
{
return $collection->aggregate(
[
'$geoNear' => [
'near' => [
'coordinates' => [-19.927954,-43.938203]
],
'sphercial' => 'true'
]
]);
});

InvalidArgumentException in Aggregate.php line 93:
$pipeline is not a list (unexpected index: "$geoNear")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions