PHP code example of ezavalishin / laravel-jsonapi-paginator

1. Go to this page and download the library: Download ezavalishin/laravel-jsonapi-paginator 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/ */

    

ezavalishin / laravel-jsonapi-paginator example snippets


YourModel::jsonApiPaginate();

YourModel::where('my_field', 'myValue')->jsonApiPaginate();

$maxResults = 60;

YourModel::jsonApiPaginate($maxResults);
bash
$ php artisan vendor:publish --provider="ezavalishin/LaravelJsonApiPaginator\LaravelJsonApiPaginatorServiceProvider" --tag="config"