Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit 596f69e

Browse files
committed
Fixed old model not loading
1 parent ade697c commit 596f69e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Http/Livewire/AutoCep.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,12 @@ public function mount(){
5050
if(!is_null($this->oldmodel))
5151
{
5252
$this->firststart = true;
53-
$this->cep = $this->oldmodel->{$this->prefix.'areacode'};
54-
$this->street = $this->oldmodel->{$this->prefix.'road'};
55-
$this->area = $this->oldmodel->{$this->prefix.'area'};
56-
$this->uf = $this->oldmodel->{$this->prefix.'state'};
57-
$this->city = $this->oldmodel->{$this->prefix.'city'};
53+
$this->cep = $this->oldmodel->{$this->prefix.$this->areacodeName};
54+
$this->cepvalue = $this->cep;
55+
$this->street = $this->oldmodel->{$this->prefix.$this->streetName};
56+
$this->area = $this->oldmodel->{$this->prefix.$this->areaName};
57+
$this->uf = $this->oldmodel->{$this->prefix.$this->ufName};
58+
$this->city = $this->oldmodel->{$this->prefix.$this->cityName};
5859
}
5960
}
6061

0 commit comments

Comments
 (0)