Example code for integration of MongoDB Atlas in Laravel
In .env add:
MONGODB_URI=mongodb+srv://USERNAME:PASSWORD@clustername.subdomain.mongodb.net/?retryWrites=true&w=majority
For info about obtaining connection string in Atlas see: https://www.mongodb.com/docs/guides/atlas/connection-string/