/** * 新商品 */ public function save() { $itemCat = new ItemCat(); $itemCat->name = Input::get('name'); $itemCat->sort = Input::get('sort'); $itemCat->save(); }
/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $itemCat = ItemCat::all(); return view("admin.attribute.create", ['itemCat' => $itemCat]); // return view("admin.attribute.create",['attr' => $attr]); }
/** * 创建一个产品 */ public function create() { $itemCat = ItemCat::all(); return view("item.create", ['itemCat' => $itemCat]); }