can you show me the filter and the pagination in html? @mancoeg
May 7, 2019
7
Level 1
filter data with pagination in laravel 5.4.36
i send an array with my keywords to appends() method and it works fine but it fails when click any other page in pagination links.
error: DecryptException the payload is invalid.
Any suggestion
CONTROLLER
$leads = new Lead;
$queries = [];
$columns = [
'state_id', 'assigned_to'
];
foreach($columns as $column){
if(request()->has($column)){
$leads = $leads->where($column, request($column));
$queries[$column] = request($column);
}
}
$leads = $leads->paginate($this->limit)->appends($queries);
return view('leads.result', compact('leads'));
VIEW
{!! $leads->render() !!}
Please or to participate in this conversation.