AbdallahSabri's avatar

pagination page 2 return page 1 on production server

I have this simple code, when I paginate to page 2, 3, 4... etc. it always shows the correct address in the address bar, but it shows ONLY the values of the first page.

    $users  =   User::where('id', '>', 2)->paginate(10);
    return view('users.index', compact('users'));

NOTE: this code works fine on my development machine, this problem only occurs on production server.

I tried to run the following command php artisan config:cache but nothing has changed

0 likes
1 reply
Borisu's avatar

Maybe a silly question, but do you have more than 10 values in the list?

Please or to participate in this conversation.