abusalameh's avatar

Pagination problem

Hi all, I used laravel pagination .. and it was working 100% ...

I didn't change anything in the code ..

The generated links are correct ... But when I choose next page or page number .. It doesn't change the content of the current page ....!!!

Ex:

... Controller

GetUsers method $users = User::paginate(10); return view('users.index',compact('users');

........ Index view

@foreach($users as $user) ... Display user data @endforeach

{!! $users->render() !!}

Any ideas ???

0 likes
6 replies
Approach's avatar

Do you have installed a debugbar?

Maybe somthing wrong with your routes. Look in debugbar that you use the right controller.

Ftoi's avatar

trying to put
$users = User::paginate(10);
$articles->setPath('User');
return view('users.index',compact('users');
and in view
{!! str_replace('/?', '?', $users->render()) !!}

abusalameh's avatar

didn't work , and i didn't installed any thing like that !!

I have a correct url ,, but when i choose another page it stays on page 1 !!!

Snapey's avatar

Does the url change? (appended with ?page=2, ?page=3 etc)

Please or to participate in this conversation.