configuration
Generate a new random application encryption key.
php artisan php artisan key:generate
Syntax
Syntax
php artisan key:generate
Explanation
Generates a 32-character random key and sets it in .env as APP_KEY. Used for encryption, hashing, and cookie signing. Run after initial installation or if the key is compromised.
Example
Example
php artisan key:generate
Explanation
Generates a 32-character random key and sets it in .env as APP_KEY. Used for encryption, hashing, and cookie signing. Run after initial installation or if the key is compromised.