Download the PHP package itsdamien/laravel-heroku-config-parser without Composer

On this page you can find all versions of the php package itsdamien/laravel-heroku-config-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-heroku-config-parser

Laravel Heroku Config Parser

Latest Stable Version Total Downloads License Build Status Maintainability Test Coverage StyleCI

Parse Heroku config vars like DATABASE_URL or REDIS_URL to work with Laravel.

Important

Due to a breaking change in Laravel 5.8 (thanks https://github.com/mathieutu for the feedback), you can use this method to achieve the same goal:

https://github.com/itsDamien/laravel-heroku-config-parser/issues/2#issuecomment-469709141

Breaking change:

https://github.com/laravel/framework/issues/27695

https://github.com/laravel/docs/pull/5039

Why

When adding a database or a redis server to your Heroku app, Heroku add a URL config var like this: DATABASE_URL=postgres://usr:pwd@localhost:5432/hellodb

Unfortunately, Laravel can't read this var, so you probably parsed it manually like this:

Laravel Heroku Config Parser parse automatically your DATABASE_URL and REDIS_URL to dynamically set all vars needed by Laravel (see the list).

Installation

Installation using composer:

Heroku

Add these config vars:

Laravel

Add this block code to the top of your config/database.php:

Enjoy !

ENV vars created

DATABASE_URL postgres://usr:pwd@ec2-s1:5432/db1 mysql://usr:pwd@ec2-s2:3306/db2
DB_CONNECTION pgsql mysql
DB_HOST       ec2-s1                         ec2-s2                    
DB_PORT       5432                           3306                      
DB_DATABASE db1 db2
DB_USERNAME usr usr
DB_PASSWORD   pwd                           pwd                        
REDIS_URL redis://h:pwd@ec2-s1:11469
REDIS_HOST ec2-s1
REDIS_PORT 11469
REDIS_PASSWORD pwd

Customize the config var who will be parsed

You can select wich config var will be parsed by setting KEY_DATABASE and KEY_REDIS like this:

License

Laravel Heroku Config Parser is open-sourced software licensed under the MIT license


All versions of laravel-heroku-config-parser with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
illuminate/support Version ~5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package itsdamien/laravel-heroku-config-parser contains the following files

Loading the files please wait ....