分页的下一个按钮 Laravel显示的值与上一页相同。
public function getInboxEmails(Request $request){
$to_user_id = Auth::user()->id;
$Inbox = DB::table('inboxes')->where('to_user_id',$to_user_id)->where('deletedTo',0)->paginate(5);
return view('mail',['Inbox'=>$Inbox]);
}
我还注意到 next_page_url=null ,prev_page_url:空值和总计 = 1。和 current_page 根本没有改变,总是 1
这些是null
的,因为结果中只有一个页面。如果查询将返回多个页面,则这些元素将包含整数而不是null
。