コード例 #1
0
 /**
  * Display products within the brand
  *
  * @param Request $request
  * @param Brand $brand
  *
  * @return Response
  * @internal param int $id
  *
  */
 public function show(Request $request, Brand $brand)
 {
     $data = $this->brand->displayProductsWithBrands($brand, $request);
     return view('frontend.brands.products')->with('brand', array_get($data, 'brand'))->with('products', array_get($data, 'pages'));
 }
コード例 #2
0
 /**
  * Store a newly created product brand in storage.
  *
  * @param BrandFormRequest $request
  *
  * @return Response
  */
 public function store(BrandFormRequest $request)
 {
     $this->data = $this->brand->add($request->all());
     return $this->handleRedirect($request, route('backend.brands.index'));
 }