Is the DATABASE_URL set when you run heroku config? If not, you probably need to run heroku pg:promote HEROKU_POSTGRESQL_RED replacing red with whatever color your database has according to Heroku.
Mar 9, 2015
8
Level 13
environment variable in laravel4.2
Recently I deploy my app on Heroku by following tutorial https://mattstauffer.co/blog/installing-a-laravel-app-on-heroku but when I try to making table or anything locally it saying
{"error":{"type":"ErrorException","message":"Undefined index: host","file":"C:\\lamp\\www\\heraku\\app\\config\\database.php","line":69}}
I try to check my environment same error
databse setting in database.php
'pgsql' => array(
'driver' => 'pgsql',
'host' => parse_url(getenv("DATABASE_URL"))["host"],
'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',
),
Please or to participate in this conversation.