Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/mongodb/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Laravel路由失败:接收PHP致命错误:在第14行的routes.PHP中找不到类“Route”_Laravel_Laravel Routing - Fatal编程技术网

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

Laravel路由失败:接收PHP致命错误:在第14行的routes.PHP中找不到类“Route”,laravel,laravel-routing,Laravel,Laravel Routing,尝试显示我的站点时,我遇到以下错误: PHP致命错误:在中找不到类“Route” /第14行的home/jillumin/public_html/muse/app/routes.php 路线如下所示: Route::resource('ideas','IdeaController'); 控制员在这里: class Idea_Controller extends BaseController { /** * Display a listing of the resource.

尝试显示我的站点时,我遇到以下错误:

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

路线如下所示:

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文件命名为spaced,或者在config/app.php中禁用了Route的别名。您还可以尝试运行“composer dump”来重建composer autoload_classmap.php。

找到解决方案了吗?