findOrFail($invitation_id); $initiation_found->delete(); $this->refreshInvitations(); $this->dispatch('success', 'Invitation revoked.'); } catch (\Exception) { return $this->dispatch('error', 'Invitation not found.'); } } public function refreshInvitations() { $this->invitations = TeamInvitation::ownedByCurrentTeam()->get(); } }