'required', 'l' => 'required', ]; } public function mount() { $this->l = Cookie::get('lang') ?: config('app.locale'); } public function updated($property, $value) { $this->validate(); if ($property === 'c') { $c = $value; } else { $c = $this->c; } if ($property === 'l') { $l = $value; } else { $l = $this->l; } Cookie::queue('lang', $this->l, 60 * 24 * 365); return to_route('welcome', ['c' => $c, 'l' => $l]); } public function render() { Cookie::queue('lang', $this->l, 60 * 24 * 365); 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; return $country; }), ])->layout('layouts.guest', [ 'SEOData' => new SEOData( title: __('Welcome'), description: __('Welcome to the portal of the Einundzwanzig Community.'), image: asset('img/screenshot.png') ), ]); } }