Level 6
added:
$contacts->appends(Request()->all())->links();
seems to work
I have implementet query string filtering using the laracast session (https://laracasts.com/series/eloquent-techniques/episodes/4).
I´m able to add pagination to the result, but how can I add pagination together with the query string? Now the next_url shows http://laravel.dev/api/getcontacts?page=2 regardless your have a query string like: http://laravel.dev/api/getcontacts?keyword=t
Getcontact controller:
$contacts = Contact::filter($filters)->paginate(2);
return response()->json($contacts);
Query string code: https://github.com/laracasts/Dedicated-Query-String-Filtering
Please or to participate in this conversation.