updateAuthFollowIds(); return view('livewire.user.follow-cards'); } /** * Called when the user follows or unfollows a user. */ #[On('user-follow-change')] public function updateAuthFollowIds(): void { // Fetch IDs of all users the authenticated user is following. $this->authFollowIds = collect(); $authUser = auth()->user(); if ($authUser) { $this->authFollowIds = $authUser->following()->pluck('following_id'); } $this->dispatch('auth-follow-change'); } }