'$refresh', 'reload_data_right' => '$refresh', ]; protected string $sport = ''; public function mount() { $this->current = Route::currentRouteName(); } public function setUser() { $user = User::find(auth()->user()->id); $this->sport = Sport::where('id', $user->sport_id)->value('name'); } public function render() { return view('livewire.top-menu-items', ['sport' => $this->sport]); } public function swopBookmaker($bookmaker_id) { $provider_id = Provider::where('bookmaker_id', $bookmaker_id)->value('id'); User::where('id', auth()->user()->id)->update(['provider_id' => $provider_id, 'bookmaker_id' => $bookmaker_id]); $this->js('window.location.reload()'); } public function swopProvider($provider_id) { User::where('id', auth()->user()->id)->update(['provider_id' => $provider_id]); $this->dispatch('reload_data_right'); } }