Livewire Infinite Scroll Pattern
January 16, 2026
•
1 min read
•
35 views
Table of Contents
Infinite scroll:
Component
public int $perPage = 10;
public function loadMore()
{
$this->perPage += 10;
}
#[Computed]
public function posts()
{
return Post::latest()->take($this->perPage)->get();
}
View
@foreach($this->posts as $post)
{{ $post->title }}
@endforeach
Loading more...
With Alpine Intersect
x-intersect.full="$wire.loadMore()"
Related Posts
Laravel Sanctum API Authentication Complete Guide
Build secure API authentication with Laravel Sanctum for SPAs and mobile apps.
Laravel Rate Limiting: Protect Your Application
Implement rate limiting to protect your Laravel application from abuse.
Laravel Blade Components: Build Reusable UI
Create powerful reusable components with Laravel Blade.
Comments (0)
No comments yet. Be the first to comment!