Emil Eriksen
Emil Eriksen

Reputation: 35

How can I make Laravel/Lumen print console friendly exceptions instead of HTML?

I'm using TDD to develop an API in Lumen. This means that I'm running PHPUnit in my console a lot and often getting exceptions. These are decorated with a bunch of HTML which obviously isn't very readable in the console. Is there a way to get Lumen to print console friendly exceptions when the app is run from the console?

Upvotes: 0

Views: 314

Answers (1)

Leo
Leo

Reputation: 7420

You can use this modified code from this link.

This was a bug on Laravel not sure for lumen. As on Laravel 5.5, the methods withExceptionHandling() and withoutExceptionHandling() are coming out of the box. So no need to use the above solution

Upvotes: 1

Related Questions