Skip to content

Commit

Permalink
Master (#2)
Browse files Browse the repository at this point in the history
* ## [1.0.1] - 2021-07-29
### Bug Fixes
- Removed extra comma in composer.json file.
- Country: fixed typo on callingcode column name.
- CityLocale: Added check for empty Division Name in the display function as it was giving errors when it was null.

Co-authored-by: Mathieu Leblond <[email protected]>
  • Loading branch information
seche and Mathieu Leblond authored Jul 29, 2021
1 parent 2fec86e commit e54f3f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed
- Nothing

## [1.0.1] - 2021-07-29
### Bug Fixes
- Country: fixed typo on callingcode column name.
- CityLocale: Added check for empty Division Name in the display function as it was giving errors when it was null.
2 changes: 1 addition & 1 deletion src/CityLocale.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function fields(Request $request)
return $request->isUpdateOrUpdateAttachedRequest();
})
->display(function($someModel){
if ($someModel->country->has_division)
if ($someModel->country->has_division && !empty($someModel->division->name))
return $someModel->name.', ' . $someModel->division->name . ', '. $someModel->country->name;
else
return $someModel->name.', ' . $someModel->country->name;
Expand Down
2 changes: 1 addition & 1 deletion src/Country.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public function fields(Request $request)
->hideFromIndex()
->nullable()
->rules( 'max:8'),
Text::make(__('Calling Prefix'), 'Callingcode')
Text::make(__('Calling Prefix'), 'callingcode')
->sortable()
->nullable()
->hideFromIndex()
Expand Down

0 comments on commit e54f3f7

Please sign in to comment.