Heat the oil in a large saucepan. Add the onion, garlic, celery, leek and carrot and sauté over a medium heat, stirring occasionally, for 3 minutes.
Add the tomatoes, stock, courgette, cabbage, bay leaf and haricot beans. Bring to the boil, then lower the heat and simmer for 10 minutes.
Add the spaghetti and season to taste with salt and pepper. Stir well and cook for a further 8 minutes. Keep stirring, otherwise the soup may stick to the base of the pan.
Add the chopped parsley just before serving, and stir well. Ladle into warm soup bowls and serve with grated Parmesan.