I can't seem to configure MongoDB properly in Phalcon; Software used; PHP 7.1.5 / Phalcon 3.1.2 / MongoDB 3.4.3
Here is what I've tried so far;
use Phalcon\Mvc\Collection\Manager;
use Phalcon\Db\Adapter\Mongo\Client;
$ld->registerNamespaces([
'Phalcon' => '../Library/Phalcon/',
])->register();
$di->setShared('mongo', function() {
$mongo = new Client('mongodb:://127.0.0.1:27017');
return $mongo->selectDb('test');
}); #mongo
$di->setShared('collectionManager', function () {
return new Manager();
}); #manager
What am I doing wrong here ? In my php error log, I see this; PHP Fatal error: Class 'MongoClient' not found
Thank You!