These are ServiceProviders that helps you use Laravel on Heroku.
These provider wont be auto-discovered.
You should add setting to config/app.php
.
- HerokuPostgresServiceProvider : Support to connect Heroku Postgres
- HerokuRedisServiceProvider : Support to connect Heroku Redis
$ composer require chatbox-inc/laravel-heroku
HerokuPostgresServiceProvider をサービスプロバイダとして公開
For Laravel
// at config/app.php
"providers" => [
HerokuPostgresServiceProvider::class,
]
After that, You can use herokupg
keyword as DB_CONNECTION
value.
DATABASE_URL will auto parsed on connecting DB.
DB_CONNECTION=herokupg
DATABASE_URL=postgres://xxxxxxxxxxxxxxxxxxxxxxxxx
HerokuRedisServiceProvider
will auto setup your redis connection.
REDIS_URL
will automatically parsed to connect Redis.
cp vendor/chatbox-inc/laravel-heroku/Procfile Procfile