1. Go to this page and download the library: Download kayedspace/laravel-erpnext 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/ */
$page = Erpnext::query('Customer')->paginate(perPage: 25, page: 3);
$page->items(); // At most 25 customers.
$page->total(); // Scalar count returned by Frappe.
$page->previousPage(); // 2
$page->nextPage(); // 4, or null on the last page.
$next = $page->next(); // One request for page 4; no repeated count.
$fifth = $page->forPage(5); // One request for page 5.