0

I am using laravel 5.2 setup of pre-built project. I am looking to show errors on browser window for any issue happens. I know a simple step to do that which is to modify the APP_DEBUG to true in .env file which is pointed by app.php config file with parameter debug. I did check that.

Additionally,

  1. I added ini_set property in index file to display_errors as true.

  2. Along with this, I commented all the $dontReport exceptions from app/Exceptions/Handler.php file-

    AuthorizationException::class,
    HttpException::class,
    ModelNotFoundException::class,
    ValidationException::class,
    
  3. Given 777 permission to my project directory.

At the end, all these crazy methods didn't workout. I tried all I was aware of. Looking for help from you guys.

DIGVJSS
  • 463
  • 1
  • 10
  • 21

1 Answers1

0

Step 1/2/3 is not necessary for Laravel and you should revert those changes.

Only APP_DEBUG=true in your .env file is required. If you are working on a local machine you should also set APP_ENV=local. To locate the 500 error without the browser you can always go look in the log file directly which is located at storage/logs.

Christophvh
  • 12,586
  • 7
  • 48
  • 70
  • I already have `APP_ENV` set to `local`, and `APP_DEBUG` to `true` and the `laravel.log` file always logs the errors correctly, but I am looking to show them on browser. – DIGVJSS Aug 29 '18 at 13:07
  • @DIGVJSS if you did that it should show in the browser. But obviously only on the endpoint where the error occurs. Commenting-out the $dontReport error does not solve anything since none of those are 500 errors anyway. – Christophvh Aug 29 '18 at 13:11