/**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $goods = Goods::paginate(5);
     $goods->setPath(url('/admin/goods'));
     return view('back.goods.index', compact('goods'));
 }
Example #2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //
     return view('admin.goods.index')->withItems(Goods::paginate(30));
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $itemPerPage = 20;
     $goods = Goods::paginate($itemPerPage);
     return view('body', ['goods' => $goods]);
 }