$this->id, 'sn' =>$this->sn, 'product'=>OrderProductResource::collection($this->products), 'total_amount' => $this->total_amount, 'created_at' => $this->created_at->toDateTimeString(), 'status' => $this->status, 'pay_info' => $this->getConsignorPayInfo(), 'pay_image'=> $this->pay_image, 'is_consignor' => $request->user()->id == $this->consignor_id, //是否发货人身份 'consignee_name'=>$this->consignee_name, 'consignee_telephone'=>$this->consignee_telephone, 'consignee_zone' => $this->consignee_zone, 'consignee_address' => $this->consignee_address, ]; } }