public function edit($id)
 {
     $brands = Brand::orderBy('sort_order')->get();
     $categories = $this->get_categories();
     $types = Type::with('attributes')->get();
     $good = Good::with('good_attrs', 'good_galleries')->find($id);
     return view('admin.good.edit', ['good' => $good, 'brands' => $brands, 'categories' => $categories, 'types' => $types]);
 }
 public function edit($id)
 {
     $category = Category::find($id);
     $types = Type::with("attributes")->get();
     $categories = $this->get_categories();
     $category->filter_attr = Attribute::with('type.attributes')->whereIn('id', unserialize($category->filter_attr))->get();
     return view('admin.category.edit', ['category' => $category, 'categories' => $categories, 'types' => $types]);
 }
Esempio n. 3
0
 public function index()
 {
     $types = Type::with('attributes')->paginate(config('wyshop.page_size'));
     return view('admin.type.index', ['types' => $types]);
 }