Using MongoDB with Laravel Query Builder outside of Laravel

In your .env file, if you set DB_CONNECTION to mongodb, you won’t have to call to include the part where you need to specify the connection for every DB query. Applicable to L5.1 and up. You can see in config/database.php when DB_CONNECTION is not set up, it defaults to mysql. Thanks :)

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.