Hello everyone, today I will show you a little trick that I use frequently in my scripts to create a Laravel application key commonly generated with artisan.
It's simple, with the help of the openssl package we can generate a random string of 32 characters and at the same time, it can be encoded in base64.
This will generate a fully valid laravel application key that you can use in your
.env configuration file.
echo "base64:$(openssl rand -base64 32)"
Thanks for reading this little tip, don't forget to share it on your social networks or with your development team.
We read soon.