public function categories() { $cats = Cat::all(); $totalBiz = Biz::count(); $totalCat = Cat::count(); $totalSubCat = subCat::count(); $stateList = State::lists('name', 'name'); $catList = Cat::lists('name', 'name'); $featured = Biz::whereFeatured('YES')->paginate(3); $recent = Biz::orderBy('created_at', 'desc')->paginate(2); return view('pages.categories', compact('stateList', 'catList', 'featured', 'cats', 'recent', 'totalBiz', 'totalCat', 'totalSubCat')); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $cats = Cat::all(); $totalCat = Cat::count(); return view('admin.cat.index', compact('cats', 'totalCat')); }