$this->id, 'goods_name' => $this->goods_name??'', 'goods_des' => $this->goods_des??'', 'goods_cover' => $this->goods_cover??'', 'goods_image' => $this->goods_image??'', 'goods_price' => $this->goods_price, 'market_price' => $this->market_price??'0.00', 'sell_num' => $this->sell_num + $this->float_sell_null, 'is_too' => $this->is_too, 'exchange_array'=> ActivityGoodsResource::make($this->whenLoaded('activityExchange')), 'goods_attrs' => GoodsAttrsResource::collection($this->whenLoaded('useGoodsAttrs'))->groupBy('attr_name'), ]; } public function with($request) { return ['code' => Response::HTTP_OK, 'message' => '']; } }