O
O
ortsuev332019-11-08 20:28:35
Laravel
ortsuev33, 2019-11-08 20:28:35

Why is pagination not working in laravel when searching?

There is a search on the site, when performing a search, it shows, let's say 4 pages, when I go to 3 (no matter which one) there are more of them, as I understand the search conditions do not work (the request is not taken into account) How can I make it take into account this data yearn for sessions , cookies or get .. or are there ready-made solutions?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Kokhan, 2019-11-08
@ortsuev33

In the view write

{{ $data->appends(['GET_параметр' => 'значение'])->links() }}

K
Konstantin B., 2019-11-08
@Kostik_1993

How can I make it take this data into account, yearn for sessions, cookies or get .. or are there ready-made solutions?

Certainly. It's called documentation!
Here's a non-admirer just like you How to organize pagination of complex queries to MySQL in Laravel 6.x?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question