/**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $cats = Category::getSelectCats();
     return view('admin.goods_cats.edit')->with('cat', Category::find($id))->with('cats', $cats);
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $goods = Goods::find($id);
     //栏目下拉框
     $cats = Category::getSelectCats();
     $types = GoodsType::all();
     //获取所有types
     $photos = $goods->photos;
     //to-do
     return view('admin.goods.edit')->with('goods', $goods)->with('types', $types)->with('cats', $cats)->with('photos', $photos);
 }