type = $type; $this->goods_id = $goods_id; $this->request = $request; $this->goods_model = Goods::with([ 'hasOneGoodsVideo', 'hasManyGoodsCategory', 'hasManyParams' => function ($query) { $query->orderBy('displayorder', 'asc'); }, 'hasManySpecs' => function ($query) { $query->orderBy('display_order', 'asc'); } ])->find($goods_id); } public function edit() { //获取规格名及规格项 $goods_data = $this->request->goods; if ($goods_data) { //正则匹配富文本更改图片标签 if ($goods_data['content']) { $goods_data['content'] = changeUmImgPath($goods_data['content']); } preg_match('/]*/', $goods_data['content'], $matches); $video_matche = '