如何为 laravel 生成 .env 文件? [英] How to generate .env file for laravel?

查看:30
本文介绍了如何为 laravel 生成 .env 文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

documentation 我看到可以创建一个 laravel 项目通过 laravel 安装程序:

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

$laravel new blog

或通过作曲家:

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

如果我尝试第一种方法,则不会创建 .env 文件.如何让 laravel、artisan 或 composer 为我创建一个 .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 文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆