Put the dried peas, previously soaked for 12 hours, in a saucepan with a liberal amount of cold water and bring to the boil. Add 1 onion, the carrot, the dry salt cod, the herbs, garlic and bayleaf. Simmer very gently till the peas are quite tender. Meanwhile, wash the spinach thoroughly and cook in a little water. Drain, chop it and add to the soup. Remove the carrot and onion from the soup and strain. Rub 1 tablespoon of the peas through a sieve and add to the soup, which should not be very thick.
Chop the other onion very finely, put it in a small saucepan with the chopped cloves of garlic, the parsley and the tomatoes, and a few tablespoons of the soup. Season with salt and pepper. Bring to the boil, simmer gently for ¾ of an hour, and stir into the soup, mixing well. One or 2 hard-boiled eggs, finely chopped, are sometimes added a few minutes before serving.