authFollowingIds = Auth::user()->following()->pluck('following_id')->toArray(); } return view('livewire.user-stack'); } public function toggleViewAll() { $this->viewAll = ! $this->viewAll; } public function closeDialog() { if ($this->refreshNeeded) { $this->dispatch('refreshNeeded'); } $this->toggleViewAll(); } public function followUser(User $user) { Auth::user()->follow($user); $this->refreshNeeded = true; } public function unfollowUser(User $user) { Auth::user()->unfollow($user); $this->refreshNeeded = true; } }