'$refresh', ]; public function mount() { $cps = Client::where('id', auth()->user()->client_id)->pluck('sport')->first(); $this->sports = Sport::whereIn('id', $cps)->pluck('name', 'id'); $this->sporticon = Sport::where('id', auth()->user()->sport_id)->pluck('icon')->first(); $this->iconcolor = Sport::where('id', auth()->user()->sport_id)->pluck('color')->first(); $this->sport_id = auth()->user()->sport_id; } public function swopSport() { User::where('id', auth()->user()->id)->update(['sport_id' => $this->sport_id]); $this->sporticon = Sport::where('id', $this->sport_id)->pluck('icon')->first(); $this->iconcolor = Sport::where('id', $this->sport_id)->pluck('color')->first(); $this->dispatch('filterClearFilter'); $this->js('window.location.reload()'); // $this->dispatch('refreshSportSwitcher'); // $this->dispatch('refreshBettypeMenu'); // $this->dispatch('refreshMultilineBookmaker'); // $this->dispatch('refreshComparingBookmakerMenu'); // $this->dispatch('refreshAlarmBookmaker'); } public function render() { return view('livewire.sport-switcher'); } }