Level 50
Hi,
Is that when you try to cache the routes?
I think you can not have any closures in a cached routes file. They need to be in your controllers.
Hope it helps!
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
please what is the solution for this
logicexception: Unable to prepare route [api/user] for serialization. Uses Closure.
Please or to participate in this conversation.