Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php artisan key:generate doesn't do anything

I tried previous questions and answers before in SO, but nothing solves my problem.

  1. I clone a new project in my Mac. Then composer update.

  2. Everything is ok so far. But when i manually create .env file via touch .env

  3. and type php artisan key:generate. Nothing happens. Absolutely nothing. No error and .env is blank as it was before. I had the same error. I tried applying sudo, nothing happens. It just says: Application key set successfully.

How to solve this problem?

like image 295
touhid udoy Avatar asked Jun 12 '26 07:06

touhid udoy


1 Answers

@Touhidul Islam You have to copy .env.example file and rename it to .env then run php artisan key:generate command

like image 93
Kirit Avatar answered Jun 13 '26 20:06

Kirit



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!