/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $products = \App\product::orderBy('product_id')->get(); $categories = \App\Category::all(); return view('pages/admin/eCommerce/products/index', compact('products', 'categories')); }