| 12345678910111213141516171819202122232425 |
- <?php /** @noinspection PhpUnhandledExceptionInspection */
- namespace App;
- use RuntimeException;
- /**
- * @var int $id
- */
- $product = Product::get($id);
- if(!$product) {
- throw new RuntimeException(__("Product not found."));
- }
- $core = Core::getInstance();
- $core->addBreadcrumb("/products", __("Products"));
- $core->addBreadcrumb($product->getUrl(), $product->name);
- $user = $core->getUser();
- $user->requireAdmin();
- View::include("header");
- View::include("product", compact("product"));
- View::include("footer");
|