Permalink
Switch branches/tags
Nothing to show
Find file Copy path
584b0cc Oct 7, 2018
1 contributor

Users who have contributed to this file

22 lines (12 sloc) 1.44 KB

Error handling

If you look at the .env file in a Laravel project, you'll find a setting called APP_DEBUG which can be set to true or false.

Local

When APP_DEBUG is set to true (as it should be on your local sever), the app is in debug mode, and any errors or exceptions triggered by your site will be displayed in full detail in the browser using a package Laravel includes called whoops.

Error settings on local server

Production

When APP_DEBUG is set to false (as it should be on your production server), the full details of errors are suppressed and the visitor instead sees a generic error page.

Error settings on production server

Error log

Regardless of your APP_DEBUG setting, all errors are written to /storage/logs/laravel.log, which should be referenced if you're having problems with your application on your production server.

Application settings supersede system settings

When working in a Laravel application, this error display/reporting behavior is made on an application level and it supersedes system level error settings discussed in these notes: PHP: Error reporting and configs