gpt4 book ai didi

php - 拉维尔 : Route not found error

转载 作者:搜寻专家 更新时间:2023-10-30 20:39:22 24 4
gpt4 key购买 nike

我有一个 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 视频以访问数据库,有人可以告诉我我在这里遗漏了什么或做错了什么吗?提前致谢。

最佳答案

可能的解决方案:

  1. 通过 Composer 更新应用程序( Composer 更新)
  2. 检查文件权限

关于php - 拉维尔 : Route not found error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26711241/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com