You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
520B

  1. <?php
  2. namespace App\Http\Controllers\Products;
  3. use App\Models\Product;
  4. use Framework\Routing\Router;
  5. class ShowProductController
  6. {
  7. public function handle(Router $router)
  8. {
  9. $parameters = $router->current()->parameters();
  10. $product = Product::find((int) $parameters['product']);
  11. return view('products/view', [
  12. 'product' => $product,
  13. 'orderAction' => $router->route('order-product', ['product' => $product->id]),
  14. 'csrf' => csrf(),
  15. ]);
  16. }
  17. }

Powered by TurnKey Linux.