jonathanport / artisan-export-config-vars-to-heroku
A simple Artisan command for Laravel to auto export .env config vars into a Heroku app. Removes the issue of having to manually add all config vars. Especially useful if you have lots!
Installs: 1 999
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=7.1
- laravel/framework: ~5.0
- symfony/process: ^4.1
Requires (Dev)
- orchestra/testbench: ^3.7
- phpunit/phpunit: ^7.3
This package is auto-updated.
Last update: 2025-04-21 22:31:39 UTC
README
A Laravel artisan command to allow a quick export of config vars to Heroku with one command. Eliminates all that time spent manually inputting config vars either through the CLI or through the web app.
Requirements
- Laravel 5
- PHP 7
- Heroku CLI
- Project to have a Heroku remote connected
Installation
composer require jonathanport/artisan-export-config-vars-to-heroku
Usage
Simply run:
php artisan export-config-vars-to-heroku
The command line will ask you to input a file name. This could be your default .env
file but I personally like to make a separate .env.heroku
file and use that to input all my config vars so I don't mess up my local file. Inside of the command line, type in .your-env
and it will continue to import your config vars.
By default, the script will not export empty values e.g. APP_NAME=
. To allow the export of empty values, you can add the --include-empty-values
flag and the script will include empty values. The script will include null
values regardless.
Feedback
Feedback is welcome. Enjoy!