Help us understand the problem. What is going on with this article?

herokuにlaravelとMysqlの環境を構築する

More than 3 years have passed since last update.

herokuにデプロイする

herokuアプリを作成

heroku create [アプリ名] --buildpack https://github.com/heroku/heroku-buildpack-php
git add .
git commit -m ''
git push heroku master
heroku config:set APP_KEY=$(php artisan key:generate --show)

確認

heroku open

Mysql

クレジットカードを登録(vプリカでも可)

heroku addons:add cleardb
heroku config

でCLEARDB_DATABASE_URLを確認

CLEARDB_DATABASE_URL: mysql://[DB_USERNAME]:[DB_PASSWORD]@[DB_HOST]/[DB_DATABASE]?reconnect=true

から

heroku config:set DB_USERNAME=[DB_USERNAME]

の様に設定していく

APP_ENV = heroku
LANG = ja_JP.UTF-8
TZ = Asia/Tokyo

これで完成

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away