public function index() { $nav = new category(); $menu_top = $nav->menu_top($nav->all()->toArray()); $hot = new Product(); $man = new Product(); $slider = Slider::all(); $hotman = $man->getHotman(); $hotPro = $hot->getHotPro(); $news = News::getNewsInIndex(); $auth = User::all(); return view('frontend.pages.index', array('menu_top' => $menu_top, 'hotPro' => $hotPro, 'hotman' => $hotman, 'slider' => $slider, 'news' => $news, 'auth' => $auth)); }