Solved - No Application Encryption Key Has Been Specified - 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, laravel 10 and laravel 11 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...
Hardik Savani
I'm a full-stack developer, entrepreneur and owner of ItSolutionstuff.com. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Laravel, Angular, Vue, Node, Javascript, JQuery, Codeigniter and Bootstrap from the early stage. I believe in Hardworking and Consistency.
We are Recommending you
- How to Use Google Translator in Laravel?
- Laravel Call Function from Same Controller Example
- Laravel Collection Check If Key Exists Example
- How to Convert Collection to JSON in Laravel?
- How to Generate App Key in Laravel?
- How to Select Specific Columns in Laravel Eloquent Model?
- How to Get All Models in Laravel?
- How to Get Columns Names from Model in Laravel?
- Laravel Ajax PUT Request Example Tutorial
- How to Setup Dynamic Cron Job(Task Scheduling) in Laravel?
- How to Get IP Address in Laravel?