📅  最后修改于: 2022-03-11 14:54:02.290000             🧑  作者: Mango
Route::get(/category/{slug});
public function postCategory($slug)
{
$posts = Post::where('slug', $slug)->get();
return view('front.posts.category', compact('posts'));
}