Solving my Lumen errors

I’ve been starting to work with Lumen, a micro-framework based on Laravel. I was getting an unexpected error, and I didn’t understand why. Here’s what I found.