From b260ad4237577bf582613f9e3797562e6e6c5645 Mon Sep 17 00:00:00 2001 From: agencetwogether <53862310+agencetwogether@users.noreply.github.com> Date: Sun, 22 Sep 2024 00:04:41 +0200 Subject: [PATCH] Add CountryEntry to Infolists --- src/Infolists/CountryEntry.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/Infolists/CountryEntry.php diff --git a/src/Infolists/CountryEntry.php b/src/Infolists/CountryEntry.php new file mode 100644 index 0000000..a009f79 --- /dev/null +++ b/src/Infolists/CountryEntry.php @@ -0,0 +1,27 @@ +getCountriesList(); + $state = $this->getState(); + + return $countries[$state] ?? $state; + } + + protected function setUp(): void + { + parent::setUp(); + + $this->formatStateUsing(fn (): string => $this->nativeCountry()); + } +}