In a shallow pan, fill one-third of the way with water. Add the lemon, bay leaf, and red pepper flakes. Bring to a very light simmer. Place cod fillets into liquid and slowly simmer cod until it easily flakes, about 5 to 8 minutes. Remove from poaching liquid, place in a bowl, flake the fish, and set aside.
Add butter or oil into a sauté pan set over medium-high heat. Sauté the finely diced pepper, celery, and shallot until softened, about 5 minutes. Return cod to the pan and gently toss until combined.
In a large bowl, add the eggs and whisk. Add the mayonnaise, dijon, paprika, garlic, black pepper, and salt and whisk until combined. Into the bowl, add the cod mixture and gently toss until combined. Add the panko and combine.
With a ⅓ measuring cup, scoop the mixture and press into the cup; turn over into your hand and pat out the cake. Gently form and set aside on a sheet pan. Make remaining cakes. Place cakes into the fridge until ready to cook, for a minimum of 30 minutes.
Set a large frying pan over medium-high heat, add the olive oil and let heat for one minute. Once the oil has heated, remove the cakes from the refrigerator. Gently place the cod cakes into the frying pan with room in between; you may need to work in batches. Cook until browned, about 5 minutes per side.