allow custom countries

This commit is contained in:
HolgerHatGarKeineNode
2023-12-08 13:46:48 +01:00
parent a7071c88db
commit 21fa8f7ed7
7 changed files with 911 additions and 823 deletions

View File

@@ -55,16 +55,15 @@ class Welcome extends Component
{
return view('livewire.frontend.welcome', [
'countries' => Country::query()
->select('id', 'name', 'code')
->orderBy('name')
->get()
->map(function (Country $country) {
$country->name = config('countries.emoji_flags')[str($country->code)
->upper()
->toString()].' '.$country->name;
->select('id', 'name', 'code')
->orderBy('name')
->get()
->map(function (Country $country) {
$flag = config('countries.emoji_flags')[str($country->code)->upper()->toString()] ?? '';
$country->name = $flag . ' ' . $country->name;
return $country;
}),
return $country;
}),
])->layout('layouts.guest', [
'SEOData' => new SEOData(
title: __('Welcome'),