public function listBrandPictures($brandid) { $brand = Brand::findorFail($brandid); // get the brand pictures $brandPictures = $brand->pictures()->get(); return view('fileentries.listPictures')->with(compact('brandPictures')); }
public function loadImages($id) { $brand = Brand::findorFail($id); $brandModels = BrandModel::where('brand_id', '=', $id)->get(); // get the brand pictures $brandPictures = $brand->pictures()->get(); return view('backoffice.brands.editImages')->with(compact('brand'))->with(compact('brandPictures')); }
public function API_models($brandid) { $brand = Brand::findorFail($brandid); return $brand->models('name', 'id', 'brand_id')->get(); }