MYYA
withPath可以用
我的控制器中分页列表方法
$data = [
'title' => '服务商品列表',
'category_list' => ServicesService::getCategoryList($this->defaultCompanyID),//服务类别
'list' => ServicesService::getServiceItemListInfo($this->defaultCompanyID, $whereRawString, $this->loginAdminId, $this->pageSize),
];
//$data['list']是MODE的paginate分页查询返回的结果
//此处是为了解决分页地址使用https问题
$data['list']=$data['list']->withPath('/'.$request->route()->uri);
return view('services.list', $data);