How to Display Errors on Laravel Sites

Error display is useful to help in debugging applications. Laravel apps are no different. Laravel applications, however, do not use the default php.ini error display technique to display errors. If error display is not enabled well, you will see a customised error page.

Below are the steps to use to enable error display on laravel sites in cPanel.

1.Login to cPanel

2.Go to File Manager under Files section and click it

3.Navigate to your .env file. If you deployed laravel inside public_html file, your .env file should be there. Otherwise, check inside the public folder of your application

4.Set the following values and Save

APP_ENV=local

APP_DEBUG=true

5. Reload the site and the errors should now display

NOTE: For security reasons, it is not recommended to always leave the error display On. Once you are done fixing the error, please change the APP_DEBUG to false.

Troubleshooting

If after changing the above, you still do not see errors displayed, check the file permissions of your app and set them correctly. Basically, folders should have 755 permissions and files 644

Was this article helpful?

Related Articles

Leave A Comment?