简体   繁体   English

git clone后Laravel项目无法正常工作

[英]Laravel project isnt working after git clone

So I started a new project and I downloaded clone of it, I did composer install & update. 因此,我开始了一个新项目,并下载了它的克隆,并进行了作曲家的安装和更新。 And I do php artisan serve to start, but there is a error says in server.php : 并且我确实开始使用php artisan,但是在server.php中有一个错误消息:

if ($uri !== '/' && file_exists(__DIR__.'/public_html'.$uri)) {
    return false;
}

require_once __DIR__.'/public_html/index.php';

Warning: require_once(C:\\Users\\eless\\PhpstormProjects\\vigil/public_html/index.php): failed to open stream: No such file or directory in C:\\Users\\eless\\PhpstormProjects\\vigil\\server.php on line 21 警告:require_once(C:\\ Users \\ eless \\ PhpstormProjects \\ vigil / public_html / index.php):无法打开流:第21行的C:\\ Users \\ eless \\ PhpstormProjects \\ vigil \\ server.php中没有此类文件或目录

Fatal error: require_once(): Failed opening required 'C:\\Users\\eless\\PhpstormProjects\\vigil/public_html/index.php' (include_path='C:\\xampp\\php\\PEAR') in C:\\Users\\eless\\PhpstormProjects\\vigil\\server.php on line 21 致命错误:require_once():无法在C:\\ Users \\ eless \\中打开所需的'C:\\ Users \\ eless \\ PhpstormProjects \\ vigil / public_html / index.php'(include_path ='C:\\ xampp \\ php \\ PEAR')第21行的PhpstormProjects \\ vigil \\ server.php

then I change it to /public instead of /public_html then its just a white screen and made php artisan migration(there was some errors about table but) says 然后我将其更改为/ public而不是/ public_html,然后将其更改为白色屏幕,并进行php artisan迁移(有关表存在一些错误,但是)说

Whoops, looks like something went wrong 哎呀,看起来像出事了

project is not visible. 项目不可见。 What I should do? 我该做什么? Is anyone can help? 有人可以帮忙吗?

Rename .env.example to .env and then run php artisan key:gen to provide an APP_KEY within the .env file. 将.env.example重命名为.env,然后运行php artisan key:gen在.env文件中提供APP_KEY。

Edit your database config settings accordingly... (username, password etc) 相应地编辑数据库配置设置...(用户名,密码等)

Once this is done, run php artisan migrate to move your database migrations into the database you set up and then reload your browser. 完成此操作后,运行php artisan migrate migration将数据库迁移移至您设置的数据库中,然后重新加载浏览器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM