我使用Laravel / Vuetify创建了一个项目,但没有.env文件。

huangapple go评论70阅读模式
英文:

I created a Project with Laravel / Vuetify and dont have a .env

问题

问题实际上已经在标题中给出了,我已经使用Laravel和Vuetify创建了一个项目,在Vuetify安装中,我已经指定他应该安装Essentials并覆盖我的文件夹中的数据。

现在以下问题:我不想为每篇我想写的文章创建一个新文件,我宁愿通过数据库运行,但我没有.env文件,我可以在其中定义连接,这让我感到沮丧,因为我现在就像一只毫无头绪的猫头鹰。

我如何在我的项目中包含一个数据库?我只需自己创建.env文件,项目就会知道如何处理吗?

我尝试在vite.config.js的第23行中定义连接,但我的IDE只给了我错误。

英文:

The question is actually already given in the title, I have created a project with Laravel and Vuetify, in the Vuetify installation I have specified that he should install the Essentials and also overwrite data in my folder.

Now the following problem: I do not want to create a new file for each article that I want to write, I would quite like to run through a database, but have no .env file where I could define the connection and that frustrates me because I'm sitting here like an owl without a clue.

How can I include a database in my project? Do I just create the .env file myself and the project already knows what to do with it?

I tried to define the connection in line 23 of vite.config.js, but my IDE only gave me errors.

答案1

得分: 1

这不是预期行为。你确定你没有从Git克隆,因为那样的话就合理了。

然而,你应该有一个.env.example文件,只需复制并将其重命名为.env,然后你就可以开始了。

英文:

It's not an expected behaviour. Are you sure you didn't clone from git cause then it would make sense.

However, you should have an .env.example file, just copy and rename it to .env and you're good to go.

huangapple
  • 本文由 发表于 2023年7月23日 19:42:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/76748033.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定