Home API Tools Posts Hire Me About
Sign In Create Account
Livewire

Building Infinite Scroll with Livewire v4

February 01, 2026 1 min read 12 views

Implement infinite scroll pagination.

Component

@php
new class extends Livewire\Component {
    public int $perPage = 10;
    
    public function loadMore(): void
    {
        $this->perPage += 10;
    }
}
@endphp

@foreach(Post::take($perPage)->get() as $post)
{{ $post->title }}
@endforeach
Share this post:

Related Posts

Comments (0)

Please log in to leave a comment. Log in

No comments yet. Be the first to comment!