Laravel-mongodb: Unsupported driver [mongodb]

Created on 1 Oct 2014  路  7Comments  路  Source: jenssegers/laravel-mongodb

Hey,

I just tried installing mongo support in laravel, but when I try to seed the database I get the error message:

[InvalidArgumentException]    
Unsupported driver [mongodb]

when I check my php for Mongo support with:

php -i | grep 'Mongo'

I get:

MongoDB Support => enabled

In my database.php I have default set to mongodb and in the connections array I have an entry for mongodb with driver => 'mongodb'

what have I overlooked?

Most helpful comment

1) make sure you are adding the service provider.
2) if you are using lumen, make sure you are adding the service provider before $app->withEloquent();

All 7 comments

Do you have the service provider included? This would indicate that the actual driver hasn't been loaded in. If you have it in your providers array and you have run a composer update try running composer dump-autoload from the command line.

Ok I seemed to have missed that line. Adding it worked, but now I am getting a different error message, but I open a ticket on laravel-mongodb-sentry, since it is more related to that now ...

Hi,
i am also getting error while migration

[InvalidArgumentException]
Unsupported driver [mongodb]

i don't why any one plz help ...?

1) make sure you are adding the service provider.
2) if you are using lumen, make sure you are adding the service provider before $app->withEloquent();

HI Tralves
That great

thank you tralves. LOVE YOUU<3

Hi @tralves ,
That perfect solution.Thanks Dude.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomartailored picture tomartailored  路  3Comments

bastiendonjon picture bastiendonjon  路  3Comments

phuocduy1988 picture phuocduy1988  路  3Comments

imrannazirbhat picture imrannazirbhat  路  3Comments

pirmax picture pirmax  路  3Comments