简体   繁体   English

Laravel项目提交错误

[英]Laravel project commit error

I committed a laravel project through github from my office PC. 我从办公室PC通过github提交了一个laravel项目。 It worked nicely there, but when I tried to run the same project on my laptop, it showed the follow error. 它在那里很好地工作,但是当我尝试在笔记本电脑上运行相同的项目时,它显示了跟随错误。 I cloned the project through github. 我通过github克隆了该项目。

Symfony \\ Component \\ HttpKernel \\ Exception \\ NotFoundHttpException Open: E:\\xampp\\htdocs\\design\\laravel\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\RouteCollection.php Symfony \\组件\\ HttpKernel \\异常\\ NotFoundHttpException打开:E:\\ xampp \\ htdocs \\ design \\ laravel \\ vendor \\ laravel \\ framework \\ src \\ Illuminate \\ Routing \\ RouteCollection.php

$others = $this->checkForAlternateVerbs($request);

    if (count($others) > 0)
    {
        return $this->getOtherMethodsRoute($request, $others);
    }

    throw new NotFoundHttpException;
}

When you clone the github repo the Vendor folder doesn't come along with it. 当您克隆github存储库时,Vendor文件夹不会随之出现。 Remember the .gitignore file 记住.gitignore文件

user3666882 is right about the vendor's folder. user3666882关于供应商的文件夹是正确的。

If you want to include the vendors file into your git repository, first run composer update (it will download all the necessary packages specified in the composer.json file). 如果要将供应商文件包含到git存储库中,请首先运行composer update (它将下载composer.json文件中指定的所有必需软件包)。 If you do not have composer installed, check their documentation. 如果您没有安装作曲家, 请查阅其文档。 .

Hope it helps. 希望能帮助到你。

Edit: Since you've edited your question, the error you are now getting means that you don't have a specific route. 编辑:由于您已经编辑了问题,现在出现的错误意味着您没有特定的路线。 Run composer dump-autoload and make sure that you are accessing an existing route and it is pointing to an existing controller method. 运行composer dump-autoload并确保您正在访问现有路由,并且该路由指向现有控制器方法。

Don't forget to also run npm install and gulp if you have any setup to pull in other depenencies. 不要忘了还跑npm installgulp ,如果您有任何设置在其他depenencies拉。 But the above answers are correct you need to run composer update 但是以上答案是正确的,您需要运行composer update

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

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