【发布时间】:2015-02-01 13:21:39
【问题描述】:
我正在尝试学习 laravel,因此通过 composer 下载了它。在 YouTube 上的某个地方,一个人从“route.php”文件开始,所以我只是跟着他,但相反,我在浏览器上遇到了一个错误,即“致命错误:在 C:\wamp\ 中找不到类 'Route' www\php\lara\app\routes.php 第 14 行”。此错误显示 'Call Stack' 沿 'Time'、'Memory'、'Function'、'位置”字段。当我切换到其他相邻文件即 Filters.php 时,它显示与类“app”而不是“路由”相同的错误。 .之后,如果我切换到“public”文件夹和“index.php”,它会显示 laravel 徽标。我正在使用带有实时预览的括号。现在我搜索了它,但没有太多回复查询(如果有的话)。
如果您需要此文件的更多详细信息:
<?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the Closure to execute when that URI is requested.
|
*/
Route::get('/', function()
{
return View::make('hello');
});
注意:如果我不使用 Brackets 的实时预览,而只是移动到 'localhost/php/lara/app/' 它不会显示任何错误,而是显示其他页面的空白页面文件夹,即“命令”、“配置”、“控制器”等。 我只是不知道该怎么做,因为这是我第一次尝试任何 MVC FRAMEWORK FOR PHP。 谢谢!
【问题讨论】:
标签: php laravel-4 laravel-routing adobe-brackets