*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'source' => $this->source, 'source_id' => $this->source_id, 'zip_code' => $this->zip_code, 'address' => $this->address, 'has_complement' => $this->has_complement, 'complement' => $this->complement, 'nickname' => $this->nickname, 'instructions' => $this->instructions, 'city_id' => $this->city_id, 'state_id' => $this->state_id, 'city' => $this->whenLoaded('city'), 'state' => $this->whenLoaded('state'), 'address_type' => $this->address_type, 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, 'deleted_at' => $this->deleted_at, ]; } }