$res = DB::table('user')->paginate(20); $res->total();//总的条数 $res->firstItem();//第一个元素 $res->lastItem();//最后一个元素 $res->lastPage();//最后一页
使用simplePaginate()分页时是没有total和lastPage的