Cursor pagination for your Laravel API

Overview

Cursor Pagination for Laravel

Latest Version Build Status StyleCI Total Downloads Software License

This package provides a cursor based pagination already integrated with Laravel's query builder and Eloquent ORM. It calculates the SQL query limits automatically by checking the requests GET parameters, and automatically builds the next and previous urls for you.

Installation

You can install this package via composer using:

composer require juampi92/cursor-pagination

The package will automatically register itself.

Config

To publish the config file to config/cursor_pagination.php run:

php artisan vendor:publish --provider="Juampi92\CursorPagination\CursorPaginationServiceProvider" --tag="config"

This will publish the following file. You can customize the name of the GET parameters, as well as the default items per page.

How does it work

The main idea behind a cursor pagination is that it needs a context to know what results to show next. So instead of saying page=2, you say next_cursor=10. The result is the same as the old fashioned page pagination, but now you have more control on the output, cause next_cursor=10 should always return the same (unless some records are deleted).

This kind of pagination is useful when you sort using the latest first, so you can keep an infinite scroll using next_cursor whenever you get to the bottom, or do a previous_cursor whenever you need to refresh the list at the top, and if you send the first cursor, the results will only fetch the new ones.

Pros

  • New rows don't affect the result, so no duplicated results when paginating.
  • Filtering by an indexed cursor is way faster that using database offset.
  • Using previous cursor to avoid duplicating the first elements.

Cons

  • No previous page, although the browser still has them.
  • No navigating to arbitrary pages (you must know the previous result to know the next ones).

Basically, it's perfect for infinite scrolling!

Basic Usage

Paginating Query Builder Results

There are several ways to paginate items. The simplest is by using the cursorPaginate method on the query builder or an Eloquent query. The cursorPaginate method automatically takes care of setting the proper limit and fetching the next or previous elements based on the cursor being viewed by the user. By default, the cursor is detected by the value of the page query string argument on the HTTP request. This value is automatically detected by the package taking your custom config into account, and is also automatically inserted into links and meta generated by the paginator.

public function index()
{
    $users = DB::table('users')->cursorPaginate();
    return $users;
}

Paginating Eloquent Results

You may also paginate Eloquent queries. In this example, we will paginate the User model with 15 items per page. As you can see, the syntax is identical to paginating query builder results:

$users = User::cursorPaginate(15);

Of course, you may call paginate after setting other constraints on the query, such as where clauses:

$users = User::where('votes', '>', 100)->cursorPaginate(15);

Or sorting your results:

$users = User::orderBy('id', 'desc')->cursorPaginate(15);

Don't worry, the package will detect if the model's primary key is being used for sorting, and it will adapt itself so the next and previous work as expected.

Identifier

The paginator identifier is basically the cursor attribute. The model's attribute that will be used for paginating. It's really important that this identifier is unique on the results. Duplicated identifiers could cause that some records are not showed, so be careful.

If the query is not sorted by the identifier, the cursor pagination might not work as expected.

Auto-detecting Identifier

If no identifier is defined, the cursor will try to figure it out by itself. First, it will check if there's any orderBy clause. If there is, it will take the first column that is sorted and will use that. If there is not any orderBy clause, it will check if it's an Eloquent model, and will use it's primaryKey (by default it's 'id'). And if it's not an Eloquent Model, it'll use id.

Example
// Will use Booking's primaryKey
Bookings::cursorPaginate(10);
// Will use hardcoded 'id'
DB::table('bookings')->cursorPaginate(10);
// Will use 'created_by'
Bookings::orderBy('created_by', 'asc')
    ->cursorPaginate(10);

Customizing Identifier

Just define the identifier option

// Will use _id, ignoring everything else.
Bookings::cursorPaginate(10, ['*'], [
    'identifier'      => '_id'
]);

Date cursors

By default, the identifier is the model's primaryKey (or id in case it's not an Eloquent model) so there are no duplicates, but you can adjust this by passing a custom identifier option. In case that specified identifier is casted to date or datetime on Eloquent's $casts property, the paginator will convert it into unix timestamp for you.

You can also specify it manually by adding a [ 'date_identifier' => true ] option.

Example

Using Eloquent (make sure Booking Model has protected $casts = ['datetime' => 'datetime'];)

// It will autodetect 'datetime' as identifier,
//   and will detect it's casted to datetime.
Bookings::orderBy('datetime', 'asc')
    ->cursorPaginate(10);

Using Query

// It will autodetect 'datetime' as identifier,
//   but since there is no model, you'll have to
//   specify the 'date_identifier' option to `true`
DB::table('bookings')
    ->orderBy('datetime', 'asc')
    ->cursorPaginate(10, ['*'], [
        'date_identifier' => true
    ]);

Inherits Laravel's Pagination

You should know that CursorPaginator inherits from Laravel's AbstractPaginator, so methods like withPath, appends, fragment are available, so you can use those to build the url, but you should know that the default url creation of this package includes query params that you might already have.

Displaying Pagination Results

Converting to JSON

A basic return will transform the paginator to JSON and will have a result like this:

Route::get('api/v1', function () {
    return App\User::cursorPaginate();
});

Calling api/v1 will output:

{
   "path": "api/v1?",
   "previous_cursor": "10",
   "next_cursor": "3",
   "per_page": 3,
   "next_page_url": "api/v1?next_cursor=3",
   "prev_page_url": "api/v1?previous_cursor=1",
   "data": [
        {}
   ]
}

Using a Resource Collection

By default, Laravel's API Resources when using them as collections, they will output a paginator's metadata into links and meta.

{
   "data":[
        {}
   ],
   "links": {
       "first": null,
       "last": null,
       "prev": "api/v1?previous_cursor=1",
       "next": "api/v1?next_cursor=3"
   },
   "meta": {
       "path": "api/v1?",
       "previous_cursor": "1",
       "next_cursor": "3",
       "per_page": 3
   }
}

Understanding the previous cursor

It's important to clarify that the previous cursor does NOT work like the next one. The next cursor makes the paginator return the elements that follow that cursor.

So in the case of the next cursor being 10, that pagination should return next + 1, next + 2, next + 3. So that works as expected.

The previous cursor though it's not prev - 1, prev - 2, prev - 3. No. It does not return the adjacent elements, or the 'context' for that cursor. What it does instead is pretty interesting:

Let's assume we do a simple fetch and it returns elements [10, 9, 8]. If we do a prev=10, it will return empty, cause those are the first elements. So if we now add 5 more to that: from the 15 to the 11, and we do prev=10 again, the result will be [15, 14, 13]. NOT [13, 12 ,11].

That's because previous works like a filter. It shows the first 'per_page' items that are before that cursor. The order is the same as in the next cursor, so it fetches the latest ones.

The same logic can be used when combining cursors: next=13&prev=10 will output the missing two elements: [12, 11], so you can complete the list without fetching any extra items.

Customizing per page results

With this plugin you can specify the perPage number by many ways.

You can set the cursor_pagination.per_page config, so if you don't send any parameters, it will use that as the default.

You can also use an array. The purpose of the array declaration is to separate whenever it's a previous cursor, or a next / default cursor. This way, when you do a 'refresh', you can fetch more results than if you are simply scrolling.

To configure that, set $perPage = [15, 5]. That way it'll fetch 15 when you do a previous_cursor, and 5 when you do a normal fetch or a next_cursor.

Customizing param names

On the config, change identifier_name to change the word cursor. Examples: cursor, id, pointer, etc.

Change navigation_names to change the words ['previous', 'next']. Examples: ['before', 'after'] , ['min', 'max']

Transforming the result:

Edit transform_name to format the string differently:

  • For previousCursor use 'camel_case'
  • For previous-cursor use 'kebab_case'.
  • For previous_cursor use 'snake_case'.

Using null defaults to camelCase.

API Docs

Paginator custom options

new CursorPaginator(array|collection $items, array|int $perPage, array options = [
    // Attribute used for choosing the cursor. Used primaryKey on Eloquent Models as default.
    'identifier'       => 'id',
    'identifier_alias' => 'id',
    'date_identifier'  => false,
    'path'             => request()->path(),
]);

(The items must have a $item->{$identifier} property.)

Eloquent Builder and Query Builder's macro:

cursorPaginate(array|int $perPage, array $cols = ['*'], array options = []): CursorPaginator;

Paginator methods

$resutls->hasMorePages(): bool;
$results->nextCursor(): string|null;
$results->prevCursor(): string|null;
$results->previousPageUrl(): string|null;
$results->nextPageUrl(): string|null;
$results->url(['next' => 1]): string;
$results->count(): int;

Note: all cursors are casted as strings.

Identifier Alias

Sometimes we need to use the paginator on a JOIN query. This might have duplicated columns, so we have to specify one for the sorting. Since Mysql doesn't allow us to use a selector alias on a WHERE condition, we have to use the table.column name instead.

$following = $user->following()
    ->orderBy('follows.created_at', 'desc')
    ->cursorPaginate(10, ['*'], [
        'date_identifier' => true,
        'identifier' => 'follows.created_at',
        'identifier_alias' => 'created_at',
    ]);

By default, the package will guess that the identifier_alias is the column name you specify, so if you order by follows.created_at, it will try to use the models created_at as identifier (by using the alias).

Testing

Run the tests with:

vendor/bin/phpunit

Credits

License

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

Comments
  • No render method?

    No render method?

    Is there a reason why there isn't a method to render the pagination links? I would of thought it could still render using the "simple" pagination view?

    opened by garygreen 16
  • use having instead of where

    use having instead of where

    This enables the use of calculated fields as cursor.

    We were hitting an issue creating an activity feed where a lot of things happen in the same request. The precision in the created_at was to the second so we were missing some entries.

    The below code works by adding id as a microsecond creating a unique cursor to sort by.

    We need to use having as the cursor is now calculated and can't be used in where.

    I can't see a downfall in moving the cursor to the HAVING over the WHERE. This should be backward compatible.

    Activity::query()
        ->select([
            '*', 
            DB::raw('CAST(UNIX_TIMESTAMP(created_at + interval id microsecond) * 1000000 as UNSIGNED) as `cursor`'),
        ])
        ->orderBy('cursor')
        ->cursorPaginate();
    
    opened by patrickomeara 4
  • Descending order queries

    Descending order queries

    Hi,

    Great work, awesome package!

    One thing I'm having some trouble with is using this package on a dataset where I'm using a descending order by. If I order by ascending on ID or created_at, it works great - but when I try to order by descending ID or created_at, I get the following results:

    • orderBy('id', 'DESC') - no results
    • orderBy('created_at', 'DESC') - loads the first page no problem, 2nd page has no results

    My use case for this is to show an infinite scrolling feed of posts - with newest posts showing first, hence needing to order by descending ID.

    Am I missing something or doing something wrong?

    Thanks in advance, Joe

    opened by joelennon 4
  • Support Laravel 6.*

    Support Laravel 6.*

    • bumped minimum version of PHP to 7.1 to support phpunit 8 with return type
    • syntaxCheck no longer supported in recent phpunit versions
    • str helper functions have been removed
    • use facade methods
    • PHPUnit have deprecated a lot of functions
    • date _identifier and identifier are protected and can no longer be tested, the subsequent tests cover this anyway
    opened by patrickomeara 2
  • Multiple order by

    Multiple order by

    Hello,

    I have some problems and don't know how to implement this package and don't know if its even possible.

    I have posts list and i have 3 possible ways to sort these posts. 1: ID descending (most relevant) 2: by distance (calculated dynamically based on lat and long in posts table and lat and long of user querying results) (it will sort by ID descending too, because distance can be same for multiple posts in some cases) 3: by most participants (users can participate to posts) (it will sort by ID descending too, because number of participants will have a lot of duplicates)

    Is there any way to implement this cursor pagination?

    I know it will work as expected in case number 1 because ID is unique, but it also says it will not work as expected in case 2 and 3 because first order by column can have duplicate values.

    Is there any workaround for this so i can use this package for this purpose? Maybe something like having cursor based on all order by columns or something like that?

    opened by radic4 2
  • Laravel 5.8 not compatible

    Laravel 5.8 not compatible

    composer require juampi92/cursor-pagination

    Using version ^1.3 for juampi92/cursor-pagination ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.

    Problem 1 - Conclusion: don't install juampi92/cursor-pagination v1.3.1 - Conclusion: remove laravel/framework v5.8.15 - Installation request for juampi92/cursor-pagination ^1.3 -> satisfiable by juampi92/cursor-pagination[v1.3.0, v1.3.1]. - Conclusion: don't install laravel/framework v5.8.15 - juampi92/cursor-pagination v1.3.0 requires illuminate/database 5.5.||5.6.||5.7.* -> satisfiable by illuminate/database[5.5.x-dev, 5.6.x-dev, 5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, v5 .5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44, v5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5. 6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.6.33, v5 .6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9]. - don't install illuminate/database 5.6.x-dev|don't install laravel/framework v5.8.15 - don't install illuminate/database 5.7.17|don't install laravel/framework v5.8.15 - don't install illuminate/database 5.7.18|don't install laravel/framework v5.8.15 - don't install illuminate/database 5.7.19|don't install laravel/framework v5.8.15 - don't install illuminate/database 5.7.x-dev|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.0|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.1|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.10|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.11|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.12|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.13|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.14|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.15|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.16|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.17|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.19|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.2|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.20|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.21|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.22|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.23|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.24|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.25|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.26|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.27|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.28|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.29|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.3|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.30|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.31|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.32|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.33|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.34|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.35|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.36|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.37|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.38|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.39|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.4|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.5|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.6|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.7|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.8|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.6.9|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.0|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.1|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.10|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.11|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.15|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.2|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.20|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.21|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.22|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.23|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.26|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.27|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.28|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.3|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.4|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.5|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.6|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.7|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.8|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.7.9|don't install laravel/framework v5.8.15 - don't install illuminate/database 5.5.x-dev|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.0|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.16|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.17|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.2|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.28|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.33|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.34|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.35|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.36|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.37|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.39|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.40|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.41|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.43|don't install laravel/framework v5.8.15 - don't install illuminate/database v5.5.44|don't install laravel/framework v5.8.15 - Installation request for laravel/framework (locked at v5.8.15, required as 5.8.*) -> satisfiable by laravel/framework[v5.8.15].

    Installation failed, reverting ./composer.json to its original content.

    opened by xerron 1
  • Is this compatible with Laravel 5.7?

    Is this compatible with Laravel 5.7?

    Hi,

    It seems i'm only able to install this with older versions of Laravel. Would it be possible to make this compatible with 5.7 as well?

    Cheers,

    Nick

    opened by nickbock 1
  • Question: is it possible to get previous page/Items?

    Question: is it possible to get previous page/Items?

    Hello, I want to know if it's possible to retrieve previous page/items? I read this in the cons section:

    No previous page, although the browser still has them.

    But then I read about the previous cursor, so I'm a little bit confused about what's possible and what's not. Thanks.

    opened by amrnn90 1
  • No way to use camelCase query parameters names

    No way to use camelCase query parameters names

    I was wanted to has query parameter ?nextCursor={cursor}, but there is no way to do that. You force underscore in names and this is not configurable.

    https://github.com/juampi92/cursor-pagination/blob/5d27c6c39734d37dd89cf744e821a5215f9c8e3f/src/CursorPaginator.php#L112-L115

    Some APIs has kebab-case parameters too. So it would be great to have configurable parameter words separator. Or just let developer to define fully qualified parameters, and not parts of them in config.

    enhancement 
    opened by antonkomarev 1
  • update nextCursor to always try to return the latest possible cursor

    update nextCursor to always try to return the latest possible cursor

    Referenced Issues

    none

    Problem Definition

    While the package in a project, my teammates where wondering if it in case of last pagination request they are able to get the latest cursor. so that if the last page contains no items/items count less than page size, they can re-call the this last request to fetch newer data if it exists.

    What does this implement/fix

    To Achieve this, the nextCursor method now

    • tries to get the last item if there are no more pages but still has some items. so get the last cursor from the last item
    • if there are no data at all, always will return a cursor from the next query string
    • if nothing exists at all then return the default null value

    Possible updates

    The current implementation can be set from configuration file whether the user wants the last request to have null value or a possible next cursor

    opened by RamiAmr 0
  • Conflict with CursorPaginator of Laravel 8

    Conflict with CursorPaginator of Laravel 8

    Hi,

    I am facing an issue with Laravel 8, after upgrading from Laravel 7.

    Laravel 8 introduces a new paginator — CursorPaginator — through the Query Builder method cursorPaginate.

    // Laravel 7.x
    get_class(User::cursorPaginate()); // returns "Juampi92\CursorPagination\CursorPaginator"
    
    // Laravel 8.x
    get_class(User::cursorPaginate()); // returns "Illuminate\Pagination\CursorPaginator"
    
    

    It conflicts with the method of this package and both behaviors are far from being similar.

    Do you have any idea on how to solve this?

    Thank you in advance.

    opened by fntneves 0
  • Use for Merged Collections

    Use for Merged Collections

    Hi there. Thank you for creating this great tool. I was wondering, is there a way to implement the CursorPagination on merged collections that are not directly created from Eloquent Models or query builders? I need to merge a few collections for what I am doing, and then would like to create new cursor paginator based on the merged collection.

    When I make a custom new CursorPaginator like this, it will create the first page just fine, but when I call the next_cursor, it does not return the next page of data:

    new CursorPaginator($collection1, 15, [ 'identifier' => 'id', 'identifier_alias' => 'id', 'date_identifier' => false, 'path' => request()->path(), ]);

    Thanks so much.

    opened by zerubabbel 0
  • date_identifier with per page confilict

    date_identifier with per page confilict

    I think there is a bug in this library.

    Let assume I pick date_identifier and the first 11 record that have exact same date value. I set per_page config to 10.

    after fetching first page, the next cursor is greater ( not equal ) than current date right? so in next page first element is 12th record and because of the limit, the 11th record will not show in first page.

    So in this situation, the 11th will not ever show in result

    opened by aliakbarazizi 0
Releases(v1.6.0)
Owner
Juan Pablo Barreto
Juan Pablo Barreto
A base API controller for Laravel that gives sorting, filtering, eager loading and pagination for your resources

Bruno Introduction A Laravel base controller class and a trait that will enable to add filtering, sorting, eager loading and pagination to your resour

Esben Petersen 165 Sep 16, 2022
In-place pagination without page refresh by using Backbone.js with Laravel PHP framework

Laravel Backbone - based in-place pagination demo Store application See demo at: http://demos.maxoffsky.com/ajax-pagination/ Tutorial at: http://maxof

Maksim Surguy 41 Oct 11, 2022
Laravel 7 Ajax Pagination Example

Now, let's see post of Laravel ajax pagination with jQuery. We will look at example of Laravel pagination json. In this article, we will implement a jQuery ajax pagination in Laravel . You can understand a concept of Laravel ajax bootstrap pagination. Here, Creating a basic example of pagination jQuery ajax Laravel

Wesley Sinde 3 Feb 23, 2022
A lightweight PHP paginator, for generating pagination controls in the style of Stack Overflow and Flickr.

PHP Paginator A lightweight PHP paginator, for generating pagination controls in the style of Stack Overflow and Flickr. The "first" and "last" page l

Jason Grimes 370 Dec 21, 2022
A Laravel Wrapper for the CoinDCX API. Now easily connect and consume the CoinDCX Public API in your Laravel apps without any hassle.

This package provides a Laravel Wrapper for the CoinDCX API and allows you to easily communicate with it. Important Note This package is in early deve

Moinuddin S. Khaja 2 Feb 16, 2022
Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

Laravel Package for TMDB API Wrapper A Laravel package that provides easy access to the php-tmdb/api TMDB (The Movie Database) API wrapper. This packa

PHP - The Movie Database 151 Nov 1, 2022
The fastest way to make a powerful JSON:API compatible Rest API with Laravel.

The first fully customizable Laravel JSON:API builder. "CRUD" and protect your resources with 0 (zero) extra line of code. Installation You can instal

BinarCode 288 Aug 8, 2022
Llum illuminates your Laravel projects speeding up your Github/Laravel development workflow

Llum illuminates your Laravel projects speeding up your Github/Laravel development workflow

Sergi Tur Badenas 110 Dec 25, 2022
Laravel-OvalFi helps you Set up, test, and manage your OvalFi integration directly in your Laravel App.

OvalFi Laravel Package Laravel-OvalFi helps you Set up, test, and manage your OvalFi integration directly in your Laravel App. Installation You can in

Paul Adams 2 Sep 8, 2022
Laravel API wrapper to interact fluently with your Janus Media Server

Laravel API wrapper to interact fluently with your Janus Media Server. Core server interactions, as well as the video room plugin included.

Richard  Tippin 11 Aug 21, 2022
A simple package allowing for consistent API responses throughout your Laravel application

Laravel API Response Helpers A simple package allowing for consistent API responses throughout your Laravel application. Requirements PHP ^7.4 | ^8.0

F9 Web Ltd. 441 Jan 5, 2023
A Laravel package to simplify using DPO Payment API in your application.

DPO (Direct Pay Online) Laravel Package The best DPO Laravel package, simple Ever This is the package that will help you add DPO Payment API to your L

Zepson Technologies 5 Nov 17, 2022
Make requests to the Shopify API from your Laravel app

Make requests to the Shopify API from your Laravel app The signifly/laravel-shopify package allows you to easily make requests to the Shopify API. Ins

Signifly 147 Dec 30, 2022
Add Active Campaign API v3 to your Laravel application.

Laravel ActiveCampaign (WIP) This package provides a simple interface to the ActiveCampaign API v3. Currently the packages only supports the endpoints

Label84 10 Nov 28, 2022
Enhance your laravel apps with WhatsApp's Cloud API

Enhance your laravel apps with WhatsApp's Cloud API Use Whatsapp API in your Laravel app! Support us Investing on this package is defintely a good mov

Ricardo Sawir 10 Dec 1, 2022
Lumen rest api demo with Dingo/Api, JWT, CORS, PHPUNIT

lumen-api-demo 这是一个比较完整用 lumen 5.7 写的的 REST API 例子。使用了 dingo/api ,jwt 实现登录,功能上很简单,登录,注册,发帖,评论,单元测试(正在补充)。 lumen5.x 请看对应的分支 有需要随时联系我 lumen/laravel/rest

Yu Li 859 Oct 25, 2022
🧑‍🔬 The missing assertions for your views in your Laravel applications.

Laravel View Assertions The missing assertions for your views in your Laravel applications. Installation You'll have to follow a couple of simple step

Sven Luijten 4 Dec 21, 2022
Automatically load your helpers in your laravel application.

Laravel AutoHelpers Automatically load your helpers in your laravel application. Installation You can install the package via composer: composer requi

Florian Wartner 6 Jul 26, 2021
Podcastwala - Your very own Podcast web app built with Laravel. Manage and listen to your favorite podcasts

Podcastwala Your very own Podcast web app built with Laravel 5. This web app enables you to manage RSS feeds for your favorite podcasts and listen to

null 142 Sep 14, 2022