public function edit($id)
 {
     $obj = Material::with(array('vendorProfile', 'productType'))->where('id', $id)->first();
     // return $obj;
     $vendors = VendorProfile::where('is_verified', 1)->get();
     $elements = Element::with('Types')->get();
     return View::make('partials.product.edit')->with('product', $obj)->with('vendors', $vendors)->with('elements', $elements);
 }
Пример #2
0
 public function getMaterialById($id)
 {
     return Material::with('accessories')->where('id', '=', $id)->first();
 }