使用Route :: resources('book','BookController')时Laravel错误;

时间:2017-11-23 05:07:24

标签: laravel-5

超级新的laravel。所以我把Route :: resources('books','BookController'); 在我的web.php中,但I am getting an error in my terminal (img)

当我运行本地主机I get something similar (img)

2 个答案:

答案 0 :(得分:2)

Route::resource('resource', 'Controller');

resource不是resourcesresources可以一次性设置多个资源:

Route::resources([
    'something' => 'SomethingController',
    'resource' => 'ResourceController',
]);

Laravel 5.5 - Docs- Controllers - Resource Controllers

答案 1 :(得分:1)