laravel 4.1 控制器方法 .... 未找到
我有这个代码,但找不到我的方法 ?
Route.php
BasicController.php
当我造成浏览器测试时: '
http://mydomain.dev/Basic/Test
不起作用 !
并获得此错误 :
Symfony \ 成分 \ HttpKernel \ 一个例外 \ NotFoundHttpException
控制器方法[测试]找不到。
为什么?
我的版本 laravel - 这是 4.1.8
Route.php
Route::controller/'Basic', 'BasicController'/;
BasicController.php
class BasicController extends BaseController {
public function getIndex//
{
return View::make/'hello'/;
}
public function getTest//
{
return 'test';
}
}
当我造成浏览器测试时: '
http://mydomain.dev/Basic/Test
不起作用 !
并获得此错误 :
Symfony \ 成分 \ HttpKernel \ 一个例外 \ NotFoundHttpException
控制器方法[测试]找不到。
open: /var/www/mydomain.dev/vendor/laravel/framework/src/Illuminate/Routing/Controller.php
* @param array $parameters
* @return mixed
*
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
*/
public function missingMethod/$method, $parameters = array///
{
throw new NotFoundHttpException/"Controller method [{$method}] not found."/;
}
为什么?
我的版本 laravel - 这是 4.1.8
没有找到相关结果
已邀请:
1 个回复
八刀丁二
赞同来自:
你可能会看到这些路线
如果你说你的索引正在工作:
所以你需要进入路线
和
不是