laravel-app-key-rotator
Usage
Basic Usage
On this page
Introduction
Everything is done via the app-key-rotator:rotate artisan command. When the command is run, it'll modify your .env file
and add OLD_APP_KEY=your-old-app-key to it. If something goes wrong with your app key rotation, you can always revert to your old app key
from your .env file. This is also used in case decryption fails with the new app key; it'll try to decrypt values with the previous app key.
See this for more information: https://gist.github.com/themsaid/ef376d7642be69c1110a0a49b0beb0ea
Command
php artisan app-key-rotator:rotate
{tip} You should probably make a backup of your
.envfile before running this command and rotating your app key.