Hello guys I'm integrating mongodb with laravel. I'm following this linkjenssegers/laravel-mongodb. I'm successful at integrating the mongodb. But when I run the code it throws me this error
FatalErrorException in Client.php line 56: Class 'MongoDB\Driver\Manager' not found
Here is the code
Controller app/Http/Controller/NewController
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\User;
class NewController extends Controller
{
//
public function index(){
$var = User::all();
var_dump($var);
}
}
and the user.php by default provided by larvel when we make the project
<?php
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Jenssegers\Mongodb\Eloquent\Model 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 facing this error.
Phpinfo --> mongodb section is coming. Here is a screen shot phpinfo
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire