'required', ]; } public function mount() { $this->currentRouteName = Route::currentRouteName(); $this->c = $this->country->code; } public function updatedC($value) { return to_route($this->currentRouteName, ['country' => $value]); } public function render() { return view('livewire.frontend.header', [ 'cities' => City::query() ->select(['latitude', 'longitude']) ->get(), 'countries' => Country::query() ->select(['code', 'name']) ->get(), ]); } }