i have a problem with making a newswebsite. I have multiple index functions to load in category views. inside of each view i want to be able to go to an article page by using the show function. how do i use multiple show functions within one controller.
these are 2 of the 8 index funtions i use.
public function indexbusiness()
{
$artikels = Artikel::where('category_id', '4')->get();
return view('pages.business')->with('artikels', $artikels);
}
public function indextech()
{
$artikels = Artikel::where('category_id', '5')->get();
return view('pages.tech')->with('artikels', $artikels);
}
i want to add show functions like this
public function showbusiness($id)
{
$artikel = Artikel::find($id);
return view(pages.show);
}
can someone help me out on this one?
all help is appreciated