作者热门文章
- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我有一个 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;
});
我得到: fatal error :
Class 'Route' not found in /.../.../.../dashboard/app/routes.php on line 13.
我一直在关注 laracast 视频以访问数据库,有人可以告诉我我在这里遗漏了什么或做错了什么吗?提前致谢。
最佳答案
可能的解决方案:
Composer 更新
)关于php - 拉维尔 : Route not found error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26711241/
我正在使用 git clone 部署我的 Laravel 项目并使用 git pull 进行更新 它工作正常,但每次部署时,我都必须从 config/app.php providers 数组和 ali
我是一名优秀的程序员,十分优秀!