I want to see errors when I work in the localhost.
App\Exceptions\handler.php
I Tried:
public function render($request, Exception $exception)
{
if ($this->isHttpException($exception) && env('APP_DEBUG') === false) {
return response()->view('errors.404', [], 404);
} else {
return parent::render($request, $exception);
}
}
or;
if ($this->isHttpException($exception) && App::environment('APP_DEBUG') === false)
I tried it as above but it does not work.
Thanks.
APP_DEBUG is set to true in .env
Through your config/app. php , set 'debug' => env('APP_DEBUG', false), to true . Or in a better way, check out your . env file and make sure to set the debug element to true.
To avoid big problems with cache, the right way to check is:
config('app.debug') == false
Try to change
env('APP_DEBUG') === false
to
env('APP_DEBUG') == false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With