Level 50
Users::paginate(20)
then in your balde:
<div class="container">
@foreach ($users as $user)
{{ $user->name }}
@endforeach
</div>
{{ $users->links() }}
Where links is the paginator
Hope it helps!
1 like
I need to do an pagination eg. Users::all() witch is the best approach?
Fast and effect pagination ?
Users::paginate(20)
then in your balde:
<div class="container">
@foreach ($users as $user)
{{ $user->name }}
@endforeach
</div>
{{ $users->links() }}
Where links is the paginator
Hope it helps!
Please or to participate in this conversation.