use MazimezGigapayInvoice; $invoices = Invoice::list(); //getting list of invoices $invoices = $invoices->paginate(1, 5); //add pagination return $invoices->getJson();