My question is little hard to explain but I will try to elaborate it cleanly. I have a StoreController which includes single show($id) function used to display single page product data. This function has one return statement which is ( return View::make('store.show')->with('product', product::find($id));
) BUT I have one other view i.e store.category where I want to display category wise results for products , Now how to accomplish this ? One method which I have in mind is to use this show function and return this ( return View::make('store.category');
) BUT there already is a return in SHOW function !
PS : Using Resource Controller and Laravel 5.2 , if any other thing is needed just mention in comments I will add it asap!
public function show($id) {
return View::make('store.show')->with('product', product::find($id));
}