A main ingredient of laundry detergent is Surfactant. This substance when added to water reduces the surface tension of the water; which in turn enables the water to wash things better.
Phosphates were once common in laundry detergents and are a macronutrient for plants. More modern laundry detergents are not good sources for phosphates.