Created
February 17, 2018 03:44
-
-
Save kjohnson/c9281489dbe642b3ca07654f311c6b7c to your computer and use it in GitHub Desktop.
A Heroku PostgreSQL connection for Laravel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| return [ | |
| 'connections' => [ | |
| 'heroku_pgsql' => [ | |
| 'driver' => 'pgsql', | |
| 'host' => @parse_url(getenv("DATABASE_URL"))['host'], | |
| 'port' => env('DB_PORT', '5432'), | |
| 'database' => @substr(parse_url(getenv("DATABASE_URL"))['path'],1), | |
| 'username' => @parse_url(getenv("DATABASE_URL"))['user'], | |
| 'password' => @parse_url(getenv("DATABASE_URL"))['pass'], | |
| 'charset' => 'utf8', | |
| 'prefix' => '', | |
| 'schema' => 'public', | |
| 'sslmode' => 'prefer', | |
| ], | |
| ], | |
| ]; |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
@suppresses theNotice: Undefined index.message for local development.