Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

NedStrk's avatar

Laravel Vapor with mongoDB

While testing my existing app on Laravel Vapor I have discovered that https://github.com/jenssegers/laravel-mongodb package used in my app is throwing an error since there is no mongoDB extension installed in Vapor's environment. Did you guys encountered this issue? How did you solve it? Did you find alternatives?

0 likes
8 replies
NedStrk's avatar

Thanks for the reply. I am using mongoDB atlas (external service), the package by jenssegers throws an error since it relies on php extension for mongodb

1 like
jlrdw's avatar

Why aren't or why dont you use Amazon DocumentDB.

NedStrk's avatar

I believe it still needs to be used together with the package mentioned earlier, and no additional PHP extensions (mongodb) on Vapot yet...

brandwagon's avatar

Can you use Laravel Vapor with Mongo yet? I’m trying to get this up and running.

NedStrk's avatar

Since my question was ignored for some time now I have found alternative to the Vapor that solved this problem for me (free)

https://bref.sh/

Give it a try.

themsaid's avatar

@nedstrk The size of the runtime Vapor uses is limited since the runtime + your project must not exceed 250MB. So we're very picky about the extensions we include out of the box.

MongoDB is not supported in the Laravel Core so we don't see a big need for it to be included in the runtime and would just add extra precious megabytes. You can however compile your own runtime and use it with Vapor if you want.

NedStrk's avatar

Thank you for response and also thanks for starting conversation on the Twitter about raising aws lambda limits. Cheers!

Please or to participate in this conversation.