I'm integrating MongoDB with Laravel. I'm following information found in this link jenssegers/laravel-mongodb. I'm successful at integrating MongoDB. But when I run the code it throws this error
FatalErrorException in Client.php line 56:
Class 'MongoDBDriverManager' not found
Here is the code
Controller
app/Http/Controller/NewController
<?php
namespace AppHttpControllers;
use IlluminateHttpRequest;
use AppHttpRequests;
use AppUser;
class NewController extends Controller
{
//
public function index(){
$var = User::all();
var_dump($var);
}
}
And here follows the user.php
that is by default provided by Laravel when we create the project
<?php
namespace App;
use IlluminateFoundationAuthUser as Authenticatable;
use JenssegersMongodbEloquentModel as Eloquent;
class User extends Eloquent
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $collection = 'users_collection';
protected $fillable = [
'name', 'email', 'password',
];
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token',
];
}
Please tell me why am I getting this error.
Phpinfo --> mongodb section is coming. Here is a screen shot
phpinfo
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…