chatbox-inc/heroku-php

0.0.8 2020-03-30 02:12 UTC

This package is auto-updated.

Last update: 2024-12-29 04:22:30 UTC


README

Latest Stable Version

These are ServiceProviders that helps you use Laravel on Heroku.

functions

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

Usage

$ composer require chatbox-inc/laravel-heroku

Heroku Postgres / Heroku Redis

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

Heroku Redis

HerokuRedisServiceProvider will auto setup your redis connection.

REDIS_URL will automatically parsed to connect Redis.

Procfile

cp vendor/chatbox-inc/laravel-heroku/Procfile Procfile