I am getting NotFoundHttpException in RouteCollection.php line 161:
当我在 http://localhost/myproject/public/vendor
运行它时出现此错误
以下是我的路线:
1
2 |
这是我在 VendorController
中的创建方法
1
2 3 4 5 |
public function create()
{ // return view(‘vendor’); } |
当我运行 php artisan route:list 时,没有列出路由 vendor
我在 php artisan 中尝试过 route:clear 但这无法解决问题。
vendor.blade.php 在 /resources/views 目录下
请任何帮助。挑战我的是,一些以相同方式配置的路由可以工作,而另一些则不能工作。
请帮忙。
你不应该在你运行的 url 中使用 public。你应该运行 http://localhost/myproject/vendor url
- 谢谢,但运行 localhost/myproject/vendor 会列出项目目录索引。
来源:https://www.codenong.com/33963085/