我正在设置我的第一个Laravel项目,并且正在进入第一个问题。Laravel - 第一次设置路由器
Router.php:
Route::get('/', function()
{
return View::make('home.index');
});
Route::any('home', function()
{
return View::make('home.index');
});
,当我访问http://localhost/laravel/public/home
我得到一个 “未找到” 错误,即使简单http://localhost/laravel/public/
作品还好吧。我究竟做错了什么? mod_rewrite已启用且'index' => ''
。
我错过了什么?
您有一个称为“home”的视图文件夹,其文件名为“index.php”? – Laurence 2013-03-15 08:24:35
您是否尝试了如下所示的备用'.htaccess'(位于最底部)http://laravel.com/docs/install – Adrenaxus 2013-03-15 09:46:28
是的,文件'index.blade.php'存在。替代'.htaccess'也没有帮助。 – 2013-03-15 13:01:57