PHP code example of crissi / laravel-cursor-pagination-with-null-values
1. Go to this page and download the library: Download crissi/laravel-cursor-pagination-with-null-values 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/ */
crissi / laravel-cursor-pagination-with-null-values example snippets
return [
'method_name' => 'cursorPaginateWithNullValues'
];;
return User::orderBy('id')->cursorPaginate(5);
return User::orderBy('id')->cursorPaginateWithNullValues(5);
return User::orderBy('nullable_column')->orderBy('id')->cursorPaginateWithNullValues(5);
bash
php artisan vendor:publish --provider="Crissi\LaravelCursorPaginationWithNullValues\LaravelCursorPaginationWithNullValuesServiceProvider" --tag="laravel-cursor-pagination-with-null-values-config"