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

ARH-Digital's avatar

Lumen / Vapor - Is it possible

As per the title, just wondering if you can run Lumen through Vapor or if it is only Laravel supported.

I cannot see any mention of Lumen in the Vapor docs, so just wondering if anyone has tried it and if it works. Obviously a Lumen based API would be vary suitable for running serverless.

0 likes
9 replies
keganlester's avatar

I attempted this myself and got it to deploy, but ran into an issue where the page took more than 10 seconds to load and then it errored out. It is possible I believe you might have to go deeper into what vapor is doing on the AWS side.

keganlester's avatar

@arh-digital Dug more into this and found that the base of Vapor uses the Illuminate\Foundation\Application and lumen uses its own. Which isn't compatible with the way Vapor handles incoming requests. Someone a lot smarter than I will have to find a solution. Getting it to deploy is easy but you just get an error because the App doesn't know what to route you too.

MattCroft's avatar

It is possible to get it working on Vapor, but it's not pretty.

I'll throw my project up on Github tomorrow that shows how i have done it.

jlrdw's avatar

Why not contact Taylor and have him explain if there's a way He suggest handling it.

willvincent's avatar

Why not just turn off the parts of laravel you don't want (views, for example) and save yourself large amounts of frustration?

MattCroft's avatar

For me this was more about the challenge rather than actually using it.

1 like
keganlester's avatar

Thank you, I am interested in the solution and how it performs!

digitalagua's avatar

I am using Laravel as an API with Vapor. I was interested in how you might turn off views as you suggested.

Please or to participate in this conversation.