Download the PHP package codelabmw/laravel-infinite-scroll without Composer

On this page you can find all versions of the php package codelabmw/laravel-infinite-scroll. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-infinite-scroll

GitHub Workflow Status (master) Total Downloads Latest Version License

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


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

Requirements

Installation

Publish the frontend infinite scroll component for your stack:

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

Backend: Add Infinite Scroll to Your Controller

Frontend: Use the Infinite Scroll Component

Depending on your stack, the component will be installed in a different location. For React, it will be installed in resources/js/components/infinite-scroll.tsx unless specified otherwise.


Usage

Backend: InfiniteScroll Facade

The core backend API is the InfiniteScroll facade:

InfiniteScroll::make(string $key, Builder|CursorPaginator|Paginator $data, int $perPage = 15, array $columns = ['*']): array

Returns: An array of props for Inertia, including:

Example:

Frontend: Use the Infinite Scroll Component

After publishing, import and use the InfiniteScroll component for your stack in your Inertia pages. The component will handle fetching more data as the user scrolls.


API Reference

InfiniteScroll::make

See Backend Usage for signature and example.

Console Commands

php artisan install:infinite-scroll

Publishes infinite scroll components of your chosen stack to your resources directory.

Stacks & Extensibility


Troubleshooting & FAQ


Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines and run the test suite before submitting a PR.

Adding Support for a New Stack

To add support for a new Inertia frontend stack (e.g., Vue, Svelte):

  1. Implement the Stack contract in src/Contracts/Stack.php for your stack.
  2. Provide the frontend component for your stack (e.g., Vue or Svelte InfiniteScroll component) in stubs directory.
  3. Register your stack in the package so it appears in the install command selection menu in src/SupportedStacks.php.
  4. Test your integration and update documentation/examples as needed.

Community contributions for new stacks are highly encouraged!

Example

Place your components in stubs/stack/stub-name.ext.

Then, register your stack in src/SupportedStacks.php:

Now your stack will appear in the install command menu!

Changelog

Please see CHANGELOG for more information on what has changed recently.


License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-infinite-scroll with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version 11.* || 12.*
inertiajs/inertia-laravel Version ^2.0.4
laravel/prompts Version ^0.3.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package codelabmw/laravel-infinite-scroll contains the following files

Loading the files please wait ...