Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

0
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.

Macからwindowsへlaravelを移した際の.env→_envになり505エラー 

Last updated at Posted at 2020-02-05

Macからwindowsへlaravelを移した際、.envファイルが_envになっていたが、.envではないとwebページが505エラーとなるので注意が必要です

.env作成

$ cp .env.example .env

でもいいが、シンプルに_env.exampleを複製して.envに名前変更してもOK!

その場合、.envのdatabase名が初期値のままなのでご自身のDBを指定してください。

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel //ここをご自身のDB名に変更
DB_USERNAME=root
DB_PASSWORD=

.envを作成した状態でページを開いたら鍵が指定されてないと怒られます。
キー.png

鍵指定

$ php artisan key:generate

その後反映をさせます.(どちらでもいいです。)

$ php artisan config:clear
$ php artisan config:cache
0
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

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
0
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?