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:
render()
method in the app/Exceptions/Handler.php
like mentioned here i only get error 500 without any output.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.
Simply override the render()
method in your app's exception handler. Per comments in the base class, this method must return a response object.
public function render($request, \Throwable $e)
{
return response()->view("exception", ["exception" => $e]);
}
Then make your blade view look however you want.
<!doctype html>
<title>Exception</title>
<body>
<p>
Exception of type <code>{{ get_class($exception) }}</code>
thrown in <code>{{ $exception->getFile() }}</code>
on line <code>{{ $exception->getLine() }}</code>.
</p>
</body>