What began as a battle between Israel and Hamas morphed into a much wider regional conflict that has reshaped much of the Middle East.