Run php artisan key:generate --show and copy the result into the .env manually
APP_KEY=TheKey
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I just pulled my project from GitHub with an intention of working on it but then when I run PHP artisan serve after doing composer install, PHP artisan config: cache and making sure that I have the .env file in the root directory, the command runs successfully but no key is generated. A quick search gives me solutions such as making sure I have a .env file, I do PHP artisan config: clear/cache, I do composer update --no-scripts etc. I have done all those but then realized again that it might be an error with PHP 7.4 from this post on GitHub:
https://github.com/laravel/framework/issues/32059
Could anyone suggest possible solutions to this problem?
Please or to participate in this conversation.