name; } /** * 收件人电话 * @return string */ public function getMobile() { return $this->mobile; } /** * 收件人详细地址 * @return string */ public function getAddress() { if ($this->Area && $this->Area->info) { return str_replace(",", "-", $this->Area->info) . '-' . $this->address; } return ''; } /** * 收件人详细地址 * @return string */ public function getAllAddressAttribute() { return str_replace(",", "-", $this->Area->info) . '-' . $this->address; } public function Area() { return $this->belongsTo(Area::class, 'area_sn', 'sn'); } public function Province() { return $this->belongsTo(Area::class, 'province_sn', 'sn'); } }