public function category($id) { $nav = new category(); $menu_top = $nav->menu_top($nav->all()->toArray()); $category = Product::getproductcate($id); $cat = category::all(); return view('frontend.pages.category', array('category' => $category, 'cat' => $cat, 'id' => $id, 'menu_top' => $menu_top)); }