| 1234567891011121314151617181920212223 |
- <?php /** @noinspection PhpUnhandledExceptionInspection */
- namespace App;
- $core = Core::getInstance();
- $core->addBreadcrumb("/products", __("Products"));
- $nvp = [];
- $count = Product::count($nvp);
- $pagination = new Pagination($count);
- $pagination->setTerms(__("%s product"), __("%s products"));
- $products = Product::query($nvp, [
- "sort" => "id",
- "offset" => $pagination->getOffset(),
- "limit" => $pagination->getPageSize()
- ]);
- View::include("header");
- View::include("products", compact("products", "pagination"));
- View::include("footer");
|