Rinse and soak the cod: Rinse the fish thoroughly and place it in a large container of cold water. Cover and place in the refrigerator for 12-24 hours. Change the water 3-4 times throughout the soakingprocess. Be sure to rinse the fish each time you change the water.
Parboil the cod: Fill a large pot with water and add the sliced garlic, bay leaves, and 2 tablespoons of olive oil. Bring the water to a full boil, then turn the flame off. Add the cod, cover the pot with a lid, and let sit for 15 minutes.
Flake the fish: Drain the water and transfer the cod to a dish to cool. Once cooled, use your fingers to break the fish into flakes and set aside.
Boil the eggs and potatoes: Place the potatoes in a large pan and cover them with water. Add 2 tablespoons of salt and bring to a boil. Once boiling, gently lower the eggs into the pan. Boil the potatoes for 8-10 minutes, until they’re fork-tender but still firm (they’ll be done a bit sooner than the eggs). Remove the potatoes, then continue boiling the eggs for another 2-4 minutes until they’re fully cooked.
Cool and slice the eggs: Transfer the boiled eggs to an ice bath and let them sit for 15 minutes. Peel and slice the eggs, then set them aside.
Sauté onions, cod and chickpeas: In a deep skillet, heat 2-3 tablespoons of olive oil over medium heat. Add the sliced onions and crushed garlic, sautéing until the onions are soft and fragrant. Add the flaked cod and chickpeas, tossing for 5 minutes.
Assemble and bake: Preheat your oven to 350° fahrenheit. Transfer half of the cod, chickpeas, and onions to a large casserole or baking dish. Layer with sliced potatoes and eggs, then top with the remaining cod, chickpeas, and onions. Arrange the remaining eggs and potatoes, and a few olives on top. Cover with foil and bake for 25-30 minutes.
Garnish and serve: Garnish with olives and fresh parsley (optional). Serve with plenty of olive oil and vinegar on the side.