$page = $request->input("page",1)-1; $perPage = $this->getPerPage(); $total1 = DB::connection('')->table('')->whereRaw($direct_where)->count(); $total2 = DB::connection('')->table('')->whereRaw($book_where)->count(); $total=$total1+$total2; $booth_book_order=DB::connection('')->table('')->select('')->whereRaw($book_where); $book_direct_sum_order = DB::connection('')->table('')->select('')->whereRaw($direct_where)->unionAll($booth_book_order)->skip($page*$perPage)->take($perPage)->get(); $content = new LengthAwarePaginator($book_direct_sum_order, $total,$perPage); //$content= $person->withPath("");
Laravel5.4手动创建分页
最新推荐文章于 2023-05-10 14:50:52 发布