- composer.lockを.gitignoreファイルから削除
- 'composer install'を実行
web: vendor/bin/heroku-php-apache2 public
$ heroku addons:add cleardb
database.php
$url = parse_url(getenv("CLEARDB_DATABASE_URL"));
$host = $url["host"];
$username = $url["user"];
$password = $url["pass"];
$database = substr($url["path"], 1);
'mysql' => array(
'driver' => 'mysql',
'host' => $host,
'database' => $database,
'username' => $username,
'password' => $password,
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
)
$ git init
$ git add .
$ git commit -m "Initial commit"
$ heroku create
$ git push heroku master
DB migration
$ heroku run php /app/artisan migrate