Laravel路由失败:接收PHP致命错误:在第14行的route.php中找不到类"Route"

Laravel路由失败:接收PHP致命错误:在第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');

    } 
}

有什么想法吗?

您已经为Routes.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.