Skip to content

Commit

Permalink
fix: #1
Browse files Browse the repository at this point in the history
  • Loading branch information
gabeta committed Feb 2, 2021
1 parent c6833d0 commit 365cbcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ class YourModel extends Model implements LaraPnnAbstract
];
}
```


#### Basic usage: Migrate without change database value
You can make a basic use of it which will migrate your numbers without modifying the values ​​in the database.
Expand Down
4 changes: 3 additions & 1 deletion src/InteractWithLaraPnn.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ public function getAttribute($key)
{
$attribute = parent::getAttribute($key);

if ((in_array($key, $this->pnnFields['mobile']) || in_array($key, $this->pnnFields['fix']))
$pnnFields = call_user_func_array('array_merge', $this->pnnFields);

if ((in_array($key, $pnnFields))
&& $this->numberIsEligible($key, $attribute) && ! $this->migratePnnFromConsole) {
return LaraPnnFacade::translateToNewPnnFormat($attribute);
}
Expand Down

0 comments on commit 365cbcc

Please sign in to comment.