作者:韩尕猫_345 | 来源:互联网 | 2023-08-10 19:37
imusinggithubincombinationwithlaravalforthefirsttime.我第一次将github与laraval结合使用。Ihave2
i'm using github in combination with laraval for the first time.
我第一次将github与laraval结合使用。
I have 2 local environments :
我有2个本地环境:
- a) i use MAMP Pro for local development (Mac)
- a)我使用MAMP Pro进行本地开发(Mac)
- b) i use XAMPP for local development (Windows)
- b)我使用XAMPP进行本地开发(Windows)
I made a new repository and pushed to github on environment a) , I cloned this repository on setup b) and added a .env file to setup my database. However i'm a bit confused what to do with the app_key value, do i need to just copy it form my initial environment? or need a new one?.
我创建了一个新的存储库并推送到环境a)的github,我在安装程序b)上克隆了这个存储库并添加了一个.env文件来设置我的数据库。但是我有点困惑如何处理app_key值,我是否需要从初始环境中复制它?还是需要一个新的?
The second part of my question is that i seem to have problems with xampp vs mamp pro because they rewrite a couple of urls, wich means my project won't run on environment b). Are there other settings i need to adjust? and will it brake again if i commit on environment b) ?
我的问题的第二部分是我似乎与xampp vs mamp pro有问题,因为他们重写了几个url,这意味着我的项目不会在环境b)上运行。我还需要调整其他设置吗?如果我承诺环境b),它会再次制动吗?
Error message when running the project on environment b)
在环境中运行项目时出现错误消息b)
Warning: require(D:\dev.local\ADifferentDesign\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in D:\dev.local\ADifferentDesign\bootstrap\autoload.php on line 17
Fatal error: require(): Failed opening required 'D:\dev.local\ADifferentDesign\bootstrap/../vendor/autoload.php' (include_path='.;C:\xampp\php\PEAR') in D:\dev.local\ADifferentDesign\bootstrap\autoload.p
I'm really confused , i saw other questions like this but none are quite what i was looking for.
我真的很困惑,我看到了这样的其他问题,但没有一个是我想要的。
A good aproach for future projects would also be very much appreciated
对未来项目的良好态度也将非常受欢迎
Progress update 1: I updated my .env file with the same key. But the error shown above still persists. I dont want to change te path in autoload every time i switch environments either.
进度更新1:我使用相同的密钥更新了我的.env文件。但上面显示的错误仍然存在。每次我切换环境时,我都不想在自动加载中更改te路径。
1 个解决方案