Blog

Laravel Credentials Package for Encrypted Application Secrets | Laravel News

Trust me, erasing secret data from version control is open-heart surgery for your VCS you never want to perform. On the other hand, having secrets in version control is helpful to keep track of changes made, given that you do so carefully. Enter Laravel Credentials.

Laravel Credentials is a new package by Marcel Pociot (of Botman fame) to help you manage sensitive data securely in your Laravel project. 3d Maker Machine

Laravel Credentials Package for Encrypted Application Secrets | Laravel News

A couple of benefits include:

Since credentials are encrypted and require a key, how do you edit them with this package?

To edit your credentials, you use an artisan command provided by the Laravel Credentials package:

Once you update the credentials, the new encrypted version gets stored in the credentials file (by default the file lives at config/credentials.php.enc. The credentials file is accessible via helpers.

To access encrypted credentials, you use the provided credentials() helper function:

To install this package and start using it, install it via composer with:

You can optionally publish the config file with the following:

Learn more about the Laravel Credentials package and access the source code from beyondcode/laravel-credentials on GitHub.

You might already be familiar with the encrypted file approach for sensitive data if you’ve used Ansible Vault.

Full stack web developer. Author of Lumen Programming Guide and Docker for PHP Developers.

Join 33,000+ others and never miss out on new tips, tutorials, and more.

The official Laravel job board connecting the best jobs with top talent.

Subscribe to the Email Newsletter

Laravel Credentials Package for Encrypted Application Secrets | Laravel News

Powerpoint 2016 Save As Html A division of dotdev inc.