【问题标题】:Laravel Route failing: Receiving PHP Fatal error: Class 'Route' not found in routes.php on line 14Laravel Route 失败:接收 PHP 致命错误:第 14 行的 routes.php 中找不到类“Route”
【发布时间】:2014-07-07 18:37:22
【问题描述】:

尝试显示我的网站时出现以下错误:

PHP 致命错误:在 /home/jillumin/public_html/muse/app/routes.php 在第 14 行

路线如下所示:

Route::resource('ideas','IdeaController');

控制器在这里:

class Idea_Controller extends BaseController {

    /**
     * Display a listing of the resource.
     *
     * @return Response
     */
    public function index()
    {
       //get all the ideas
       $ideas =  idea::all();

       // load the view and pass the ideas
        return View::make('muse.index');

    } 
}

有什么想法吗?

【问题讨论】:

  • 您找到解决方案了吗?

标签: laravel laravel-routing


【解决方案1】:

您已经对您的 routes.php 文件进行了命名空间,或者在 config/app.php 中为 Route 禁用了别名。您也可以尝试运行“composer dump”来重建 Composers autoload_classmap.php。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-12-30
    • 2018-05-01
    • 2021-11-12
    • 2020-05-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-09
    相关资源
    最近更新 更多