How to perform drop() or remove() and other functions by using MongoDB drivers for php 7?
I refered https://docs.mongodb.org/v3.0/reference/method/js-collection/
<You can delete a collection like this:
$manager = new \MongoDB\Driver\Manager("mongodb://" . $username . ":" . $password . "@{$host}:{$port}");
$manager->executeCommand('database', new \MongoDB\Driver\Command(["drop" => "collection"]));
or you could follow the instructions in this guide:
$db = (new MongoDB\Client)->demo;
$result = $db->dropCollection('users');
var_dump($result);