to make a law about something
Only Parliament has the power to legislate on constitutional matters.
The government has promised to legislate against discrimination.
We must legislate for equal pay.
legislate to do something
We must legislate to control these drugs.
to think about how something may affect what you are doing, and do something to prepare for it:
You can't legislate for bad luck.