PHP・mongoDBで比較演算子を使う

‘date’ => [ ‘$gte’ => $date]とします。

$date = date("Y-m-d");
echo $date ."<br>";


$mng = new MongoDB\Driver\Manager("mongodb://localhost:27017");

$filter = [
	'date' => [ '$gte' => $date]
];
$options = [
  'projection' => ['_id' => 0],
  'sort' => ['_id' => -1],
];
$query = new MongoDB\Driver\Query($filter, $options);

$cursor = $mng->executeQuery('app.na007', $query);

foreach ($cursor as $document) {
  var_dump($document);
}