Home » Laravel, PHP31 October 2016

Laravel: Enable Proper Error Display

By default, you will see the following message in case any error occurs in your Laravel application:

Whoops, looks like something went wrong.
Whoops, looks like something went wrong.

To show the exact error message details, you need to follow the steps below:

– Go to your Laravel root folder
– Rename .env.example to .env

After this, when you refresh your web page, you might see the following error message details:

No supported encrypter found. The cipher and / or key length are invalid.

Now, at least you got the error details. The error means that the encryption key for your Laravel application has not been generated yet. To generate the key, you need to run the following command:

– Open terminal or command prompt
– Go to your Laravel root folder (e.g. cd /var/www/laravel)
– Run the following command:

– You will see the message on terminaly saying application key set successfully.
– This will update .env file present in your laravel root folder. In that file, it will set the value of APP_KEY.

Now, when you browser your Laravel site, you should see your page without any error.

Hope this helps. Thanks.


Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed

Comments are closed.