PHPackages                             codelabmw/laravel-infinite-scroll - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. codelabmw/laravel-infinite-scroll

ActiveLibrary

codelabmw/laravel-infinite-scroll
=================================

A Laravel package for easily implementing infinite scroll in your inertia applications.

v1.0.2(9mo ago)237MITPHPPHP ^8.3CI passing

Since Aug 4Pushed 9mo agoCompare

[ Source](https://github.com/codelabmw/laravel-infinite-scroll)[ Packagist](https://packagist.org/packages/codelabmw/laravel-infinite-scroll)[ RSS](/packages/codelabmw-laravel-infinite-scroll/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (11)Versions (4)Used By (0)

 [![Art](art/package-art.png)](art/package-art.png)

 [![GitHub Workflow Status (master)](https://github.com/codelabmw/laravel-infinite-scroll/actions/workflows/run-tests.yml/badge.svg?branch=main)](https://github.com/codelabmw/laravel-infinite-scroll/actions) [![Total Downloads](https://camo.githubusercontent.com/3b83d967b3ebd8efedcd79c95bb3a718d8608a67910ee43836228f9287596b32/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f64656c61626d772f6c61726176656c2d696e66696e6974652d7363726f6c6c)](https://packagist.org/packages/codelabmw/laravel-infinite-scroll) [![Latest Version](https://camo.githubusercontent.com/9e51f70944867ca28d595dd79ddb68d6d95320f821980d3106f052dda848a3b9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f64656c61626d772f6c61726176656c2d696e66696e6974652d7363726f6c6c)](https://packagist.org/packages/codelabmw/laravel-infinite-scroll) [![License](https://camo.githubusercontent.com/817d5636194ce4f5b7873c9f00f476e991e3c7b58b500441e12c165c7b6945cb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f64656c61626d772f6c61726176656c2d696e66696e6974652d7363726f6c6c)](https://packagist.org/packages/codelabmw/laravel-infinite-scroll)

Laravel Infinite Scroll
=======================

[](#laravel-infinite-scroll)

A Laravel package for easily implementing infinite scroll in your Inertia.js applications, regardless of frontend stack (React, Vue, Svelte, etc.).

This package is designed to be stack-agnostic: each frontend stack (React, Vue, Svelte, etc.) can have its own Infinite Scroll component. The package provides a convenient mechanism to install and use the appropriate component for your stack.

---

📚 Table of Contents
-------------------

[](#-table-of-contents)

- [Overview](#overview)
- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Usage](#usage)
    - [Backend: InfiniteScroll Facade](#backend-infinitescroll-facade)
    - [Frontend: React Component](#frontend-react-component)
- [API Reference](#api-reference)
    - [InfiniteScroll::make](#infinitescrollmake)
    - [Console Commands](#console-commands)
    - [Stacks &amp; Extensibility](#stacks--extensibility)
- [Troubleshooting &amp; FAQ](#troubleshooting--faq)
- [Contributing](#contributing)
- [Changelog](#changelog)
- [License](#license)

---

Overview
--------

[](#overview)

**Laravel Infinite Scroll** brings a plug-and-play infinite scrolling experience to your Inertia.js powered Laravel apps. It seamlessly integrates backend pagination and frontend rendering, making your lists and feeds truly dynamic.

Features
--------

[](#features)

- Effortless infinite scroll for Eloquent queries, Paginators, and CursorPaginators
- Stack-agnostic: works with any Inertia frontend adapter (React, Vue, Svelte, etc.)
- Comes with ready-to-use components for common stacks (currently React; others can be contributed)
- Artisan command to install stack-specific components with stack detection and custom path support
- Fully typed, tested, and extensible

Requirements
------------

[](#requirements)

- PHP ^8.3
- Laravel 10+
- Inertia.js (any frontend adapter: React, Vue, Svelte, etc.)

Installation
------------

[](#installation)

```
composer require codelabmw/laravel-infinite-scroll
```

Publish the frontend infinite scroll component for your stack:

```
php artisan install:infinite-scroll
```

The install command will list all supported stacks and prompt you to choose your stack and the path where to publish the component. It will also try to detect your current stack and set it as the default in the selection menu.

> **Note:** Currently, only React stack components are included. Support for other stacks (Vue, Svelte, etc.) is planned for future versions and community contributions are welcome!

Quick Start
-----------

[](#quick-start)

### Backend: Add Infinite Scroll to Your Controller

[](#backend-add-infinite-scroll-to-your-controller)

```
