customers.php 487 B

123456789101112131415161718192021
  1. <?php
  2. namespace App;
  3. $core = Core::getInstance();
  4. $core->addBreadcrumb("/customers", __("Customers"));
  5. $count = Customer::count();
  6. $pagination = new Pagination($count);
  7. $pagination->setTerms(__("%s customer"), __("%s customers"));
  8. $customers = Customer::query([], [
  9. "sort" => "name",
  10. "offset" => $pagination->getOffset(),
  11. "limit" => $pagination->getPageSize()
  12. ]);
  13. View::include("header");
  14. View::include("customers", compact("customers", "pagination"));
  15. View::include("footer");