where('workspace_id', $workspace->id) ->firstOrFail(); $this->memberId = $memberId; $this->memberName = $member->user->name ?? ''; } public function remove(): void { $workspace = app('current_workspace'); WorkspaceMember::where('id', $this->memberId) ->where('workspace_id', $workspace->id) ->firstOrFail() ->delete(); $this->dispatch('memberRemoved', memberId: $this->memberId); $this->closeModal(); } public static function modalMaxWidth(): string { return 'sm'; } public function render(): View { return view('livewire.modals.remove-member'); } }