يوفر Livewire v4 دعم تصفح سلس.
التصفح البسيط
use Livewire\WithPagination;
class PostList extends Component
{
use WithPagination;
public function render()
{
return view('posts', ['posts' => Post::paginate(10)]);
}
}القالب
<div>
@foreach($posts as $post)
<div>{{ $post->title }}</div>
@endforeach
{{ $posts->links() }}
</div>