2
votes

I want to use https://github.com/jenssegers/laravel-mongodb for connecting to Mongodb with laravel 5, i have installed MongoDB php driver and then laravel-mongodb with command composer require jenssegers/mongodb, then added service provider in app/config/app.php:

'Jenssegers\Mongodb\MongodbServiceProvider',

and refreshed my website, unfortunately i got error ->

FatalErrorException in compiled.php line 6466:
Class 'Jenssegers\Mongodb\MongodbServiceProvider' not found

how can i fix it?

3

3 Answers

3
votes

I didn't have the archive: myproject/vendor/jenssegers.

I installed this archive by command:

$ composer require jenssegers/mongodb
2
votes

run composer dump-autoload or php artisan optimize

1
votes

Delete Following Files and Use This Step :

composer.lock

bootstrap/cache/config.php

if exist

bootstrap/cache/services.php

then Run this command :

composer install

php artisan config:cache