我把我的控制器稱爲「LoginController」在文件夾「登錄」。Laravel控制器在文件夾 - 路由不起作用
class LoginController extends BaseController{
public $restful = true;
//log in function
public function Login(){
// load the login page
return View::make('login.login');
}
}
在路線,我給這個:
Route::get('/',array('uses'=>'[email protected]'));
也試過
Route::get('/',array('uses'=>'login\[email protected]'));
Route::get('/',array('uses'=>'login\[email protected]'));
以上都不似乎工作,並給我類不存在錯誤。 我非常驚慌,這個錯誤。我在「使用」中訪問控制器的方式是否正確?在我能夠使用它之前,我還需要做些什麼嗎?
任何幫助真的很感激!
你使用laravel 3還是4? – SamSquanch
這是Laravel 4 –