我想從 到 ,但他們告訴我找不到這樣的路線。我做錯了什么。提前感謝您的幫助。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 關注
- 91 瀏覽
添加回答
舉報
0/150
提交
取消