Php Laravel在资源上引发NotFoundHttpException
这是我的网址:Php Laravel在资源上引发NotFoundHttpException,php,laravel,laravel-4,Php,Laravel,Laravel 4,这是我的网址: http://serverHost:port/projectName/public/restaurants/create 这是错误消息: Open: UrlToProject\bootstrap\compiled.php if (!is_null($route)) { return $route->bind($request); } $others = $this->checkForAltern
http://serverHost:port/projectName/public/restaurants/create
这是错误消息:
Open: UrlToProject\bootstrap\compiled.php
if (!is_null($route)) {
return $route->bind($request);
}
$others = $this->checkForAlternateVerbs($request);
if (count($others) > 0) {
return $this->getOtherMethodsRoute($request, $others);
}
throw new NotFoundHttpException();
}
protected function checkForAlternateVerbs($request)
虽然路线确实是这样存在的:
Route::resource('restaurants', 'RestaurantsController');
控制器RestaurantController
具有以下方法:
public function create()
{
return View::make('restaurants.create');
}
这种观点是绝对存在的。请问我做错了什么
我正在Windows7上开发Laravel4.2.3
另外,我注意到了这些锁
标志。这是错的吗
我自己发现了这个问题
项目名称有一个大写字母,我把它叫做小写:)你把控制器放在哪里了?你有名字空间吗?在控制台中尝试
composer dump autoload
。否则肯定是笔误。让我们看看你的控制器code@estshy我将控制器放入controller
文件夹中,并且已经使用artisan
创建了控制器。另外,不,我没有尝试composer dump autoload
请问这是什么?@estshy我尝试在根目录上执行该命令,然后尝试调用url,而您在此处显示的相同错误代码没有任何错误。尝试运行artisan serve
并使用默认地址localhost:8000或Laravel提供的任何url访问您的网站。@estsh服务器正在工作,我可以看到主页。但是我注意到了一些奇怪的事情,我试图创建一个简单的页面路由,它给了我同样的错误,所以路由根本不起作用,也许我必须重新编译?我看到这个锁定的
登录文件夹,我将编辑QUESTION以显示给您,请稍候