mercredi 3 mai 2017

Class 'MongoDB\Driver\Manager' not found | Mongo and Laravel

I've just started Mongo using Laravel and finding an issue for the connection, "Class 'MongoDB\Driver\Manager' not found". Following is my composer.json snippet.

"require": {
  "php": ">=5.5.9",
  "laravel/lumen-framework": "5.2.*",
  "vlucas/phpdotenv": "~2.2",
  "mongodb/mongodb": "^1.0.0"
}

The extension is enabled in php.in for mongodb.so Moreover, the mongoDB is up and running via the mongo clint, RoboMongo.

This is how I am creating the instance for mongoDB, mongoDB is included at the top of the file by 'use'.

$mongoObj = new MongoDB\Client($host, ['username' => $username, 'password' => $password]);

I've seen many links and noting worked for me. Where am going wrong?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire