@sert12 do you think we know whaat $this->apiController->search_with_date_range do? What's the result of this method? LengthAwarePaginator instance? Some kind of array?
Dec 6, 2022
6
Level 1
how to set pagination with offset and limit. then how to show on blade. my code like that;
public function shipment(Request $request,$offset=0,$limit=0)
{
$rdf = $request->input('date-from');
$rdt = $request->input('date-to');
if($rdf == "" && $rdt == "")
{
return redirect()->route('gh');
}
$date_from = ( $rdf == "" ) ? getLastSevenThDay() : date_format(date_create($rdf),"Y-m-d");
$date_to = ( $rdt == "" ) ? getNextSevenThDay() : date_format(date_create($rdt),"Y-m-d");
$ghl = $this->apiController->search_with_date_range($date_from,$date_to,20,30);
if($ghl == 'Fail')
{
return redirect()->action('LogoutController@instant_logout');
}
return view('pages.gh', compact('ghl','rdf','rdt'));
Please or to participate in this conversation.