Laravel:未找到路线错误

时间:2014-11-03 09:27:16

标签: php mysql database laravel-4

我在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()
 {
   $topPages = DB::table('webmasters') -> get();
   return $topPages;
 });

我得到:致命错误:

  

在/.../.../.../dashboard/app/routes.php中找不到“路线”类   第13行。

我已经按照laracast视频访问了数据库中的信件,有人可以告诉我这里我错过了什么或做错了吗? 提前谢谢。

1 个答案:

答案 0 :(得分:1)

可能的解决方案:

  1. 通过composer(composer update
  2. 更新应用
  3. 检查文件权限