How to generate .env file for laravel?

前端 未结 10 1062
不知归路
不知归路 2020-12-24 05:39

From the documentation I see it\'s possible to create a laravel project via laravel installer:

$laravel new blog

or via composer:



        
10条回答
  •  半阙折子戏
    2020-12-24 06:26

    There's another explanation for why .env doesn't exist, and it happens when you move all the Laravel files.

    Take this workflow: in your project directory you do laravel new whatever, Laravel is installed in whatever, you do mv * .. to move all the files to your project folder, and you remove whatever. The problem is, mv doesn't move hidden files by default, so the .env files are left behind, and are removed!

提交回复
热议问题