1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MAMP+postgres+laravel memo

Last updated at Posted at 2018-09-14

user の作成

createuser -P testuser

user の確認

psql -q -c'select * from pg_user' postgres

databse の作成

createdb testdb -O testuser

DB に接続

psql -U testuser testdb

laravelのインストール

composer create-project --prefer-dist laravel/laravel test_app

laravelの.envへのDB設定

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=testdb
DB_USERNAME=testuser
DB_PASSWORD=testpass

.envのDB設定があっているか確認

/Applications/MAMP/bin/php/php*.*.*/bin/php artisan migrate

全HTTPリクエスト

設定ファイル

configディレクトリ内

ディレクトリパーミッションの変更 WEBサーバから書き込み可能にする

chmod -R 777 ./storage
chmod -R 777 ./bootstrap/cache
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?