laravel-mongodb: Class 'MongoDB\Driver\Manager' not found
Hello, I’m using Php7.1, Laravel 5.5, and Mongo 3.4.10 as Dockers.
In the .../vendor/mongodb/mongodb/src/Client.php
file, the corresponding FatalThrowableError Class 'MongoDB\Driver\Manager' not found
appears on line 83.
In the Model
<? php
namespace App\Models\Mongo;
use Jenssegers\Mongodb\Eloquent\Model as Moloquent;
class Keywords extends Moloquent
{
protected $connection = 'mongodb';
protected $collection = 'keywords';
}
I used the code,
In the Controller,
public function keyword ()
{
Keywords::all();
}
I used the code.
The database.php file contains
'mongodb' => [
'driver' => 'mongodb',
'host' => '127.0.0.1',
'port' => '27017',
'database' => 'test',
],
I put this code in it.
I’ve been looking for the same error since yesterday, but it’s still the same. Help is urgently needed.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 34 (4 by maintainers)
Thanks
If your using valet, restart it after installation.