id === (int) $comment->user_id; } /** * Users can delete their own comments; admins can delete any comment. */ public function delete(User $user, ArtworkComment $comment): bool { return $user->id === (int) $comment->user_id || $user->is_admin; } }