Laravel路由失败:接收PHP致命错误:Class' Route'在第14行的route.php中找不到 [英] Laravel Route failing: Receiving PHP Fatal error: Class 'Route' not found in routes.php on line 14

查看:89
本文介绍了Laravel路由失败:接收PHP致命错误:Class' Route'在第14行的route.php中找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am getting the following error when trying to display my site:

PHP致命错误:在中找不到类"Route"/home/jillumin/public_html/muse/app/routes.php,第14行

PHP Fatal error: Class 'Route' not found in /home/jillumin/public_html/muse/app/routes.php on line 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');

    } 
}

有什么想法吗?

推荐答案

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

You've either name-spaced your routes.php file or disabled the alias in config/app.php for Route. You could also try running 'composer dump' to rebuild Composers autoload_classmap.php.

这篇关于Laravel路由失败:接收PHP致命错误:Class' Route'在第14行的route.php中找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆