'Remove stack trace from Laravel error page

How would i remove the lengthy stack trace errors that Laravel uses by default? (i understand it is using "Ignition")

Some resources that i've found that did not help:

  • this thread only mentions how to disable error reporting altogether
  • when i write anything in a render() method in the app/Exceptions/Handler.php like mentioned here i only get error 500 without any output.
  • person in this thread even suggests writing your own Laravel bootstrap application instead of using the default one, breaking Laravel framework semantics, but that's just plain mad.

I have also tried looking at configuration values for Ignition by publishing ignition config file via

php artisan vendor:publish --provider="Facade\Ignition\IgnitionServiceProvider" --tag="ignition-config"

But that file has nothing to configure, the only thing you can do is to hide the "share" message in the error.

I just want a simple classic php error page with file/line/error, no stack traces, or no html markup. The error page makes it really difficult to debug output in anything else than a web browser.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source