我想从 到 ,但他们告诉我找不到这样的路线。我做错了什么。提前感谢您的帮助。home.blade.phpall_article.blade.php博客/首页刀片 <a href="{{route('blog.all_article')}}" class="btn btn-primary pull-right"><i class="fa fa-plus-square-o"></i> Add</a> 博客控制器public function articlesAll_blade(){ return view('blog.all_article',[ 'articles' => Article::orderBy('created_at', 'desc')->paginate(10), 'footers' => System::all(), ]);}网站.php Route::get('/', 'BlogController@articlesAll', function () { return view('blog.home'); }); Route::get('/all_article', 'BlogController@articlesAll_blade', function () { return view('blog.all_article'); });
2 回答
慕容708150
TA贡献1831条经验 获得超4个赞
您缺少的是路由名称,为您的路由添加名称
Route::get('/all_article', 'BlogController@articlesAll_blade', function () { return view('blog.all_article'); })->name('blog.all_article');// see the name part
文档链接 https://laravel.com/docs/routing#named-routes
一只萌萌小番薯
TA贡献1795条经验 获得超7个赞
Route::get('/all_article','BlogController@articlesAll_blade')->name('blog.all_article');
- 2 回答
- 0 关注
- 67 浏览
添加回答
举报
0/150
提交
取消