PHP code example of bitsnbolts / laravel-cursor-paginate

1. Go to this page and download the library: Download bitsnbolts/laravel-cursor-paginate library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bitsnbolts / laravel-cursor-paginate example snippets


return [
];

$paginator = App\Models\ExampleModel::cursorPaginateWithTotal(10, ['created_at' => 'desc', 'id' => 'desc']);
$items = $paginator->items();
$nextUrl = $paginator->nextCursorUrl();
bash
php artisan vendor:publish --provider="Bitsnbolts\CursorPaginate\CursorPaginateServiceProvider" --tag="laravel-cursor-paginate-config"