Beispiel #1
0
 /**
  * Render view products.
  * GET /products/{$type}
  *
  * @return view
  */
 public function getProducts($type, ProductInterface $productRepo, TypeInterface $typeRepo)
 {
     $products = $productRepo->getProductByeType($type);
     $type = $typeRepo->getOne($type);
     $data = ['products' => $products, 'type' => $type];
     return view('public.products', $data);
 }
Beispiel #2
0
 /**
  * Render view for type editing.
  * GET /admin/edit-type/{id}
  *
  * @param  integer $id
  * @param  TypeInterface $typeRepo
  * @return view
  */
 public function getEditType($id, TypeInterface $typeRepo)
 {
     $type = $typeRepo->getOne($id);
     $data = ['bodyClass' => 'skin-3 no-skin', 'id' => $id, 'type' => $type, 'action' => 'edit', 'product' => true];
     return view('admin.type.add-edit-type', $data);
 }