问题描述
从文档中,我看到可以创建laravel项目通过laravel安装程序:
From the documentation I see it's possible to create a laravel projectvia laravel installer:
$laravel new blog
或通过作曲家:
$composer create-project laravel/laravel --prefer-dist
如果我尝试不创建.env文件的第一种方法.如何要求laravel,artisan或作曲家为我创建一个.env文件?
If I try the first way .env file is not created.How can I ask laravel,artisan or composer to create a .env file for me?
推荐答案
我遇到了这个项目中没有显示.env文件的问题.
I had this problem of no .env files showing up in the project.
结果证明我正在使用的IDE(Netbeans,请不要判断)将显示某些类型的.hidden文件,但不是全部.
Turns out the IDE I was using (Netbeans, try not to judge) will show certain types of .hidden files but not all.
绞尽脑汁后,我检查了文件系统,找到了.env + .env.example文件/使用文本编辑器对其进行了修改.
After racking my brains for a bit I checked the file system and found the .env + .env.example files / modified them with a text editor.
将这种答案留给像我这样使用狡猾的IDE的人的罕见情况来解决.
Leaving this answer for the rare situation someones using a dodgy IDE like myself.
这篇关于如何为Laravel生成.env文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!