英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论