我收到的错误是控制器不存在,即使我知道它存在,这是代码。
路线.php
Route::get('mdpay/template', array("uses" => "templateController@index"));
templateController.blade.php
class templateController extends BaseController {
public function index()
{
echo "made it";
}
}
为什么我会收到此错误:Class TemplateController 不存在
=================更新:==================
好的,所以我已经创建了正确的路线,重命名了我的文件,并更正了类名,但我仍然遇到该错误。
文件名:
模板控制器.php
// File Name: TemplateController.php
class TemplateController extends BaseController {
public function index()
{
// app/views/myView.blade.php
echo "hello";
}
}
我的路线是:
Route::get('mdpay/template', array("uses" => "TemplateController@index"));
仍然收到控制器不存在错误。我的所有其他控制器(另外 3 个)都在工作,除了这个。