Laravel 4.1.0基本路由不起作用

时间:2013-12-16 08:41:38

标签: php laravel routing

我已在Windows上成功安装了最新版本的Laravel 4.1.0

我使用XAMPP,并安装在C:\xampp\htdocs\lar

当我打开http://myhost.com/lar/public时,会显示带有徽标的消息“你已到达”。

所以我通过编辑文件

开始非常简单的任务
C:\xampp\htdocs\lar\app\routes.php

并添加以下代码

Route::get('my/page', function()
{
    return 'hello world';
});

这是完整的routes.php文件。

Route::get('/', function()
{
    return View::make('hello');
});
Route::get('my/page', function()
{
    return 'hello world';
});

但是当我输入网址时。

http://myhost.com/lar/my/page/

它显示错误404对象未找到?我应该在哪里编辑?

0 个答案:

没有答案