By Hardik Savani
February 18, 2023
Category :
Laravel
Hi Dev,
This tutorial will give you an example of no application encryption key has been specified. laravel. This tutorial will give you a simple example of laravel no application encryption key has been specified. We will look at an example of laravel 500 error no application encryption key has been specified. In this article, we will implement a laravel ajax no application encryption key has been specified.
You can use this solution with laravel 6, laravel 7, laravel 8, laravel 9 and laravel 10 versions.
Few days ago i was working on very old laravel app and i installed it. Then i simply run app and get "no application encryption key has been specified" error. But i know how to fix it. i need to generate app key using artisan command. so if you found following error then you can use below solution.
"no application encryption key has been specified"
Solution:
You need to generate app key using laravel artisan command. let's run below command.
php artisan key:generate
Then you will see on following
.env
file with updated value on
APP_KEY
variable.
.env
APP_KEY=base64:P9r5RXnghdhnhohddh2HDhBkPGnbLClYiRLx02QG0V6Tw=
Now, you can run your laravel app and it will works.
I hope you get it.
It can help you...