Sydney, New South Wales help!?

Hello! I understand that Sydney is the capital of New South Wales. Does Sydney follow laws made by NSW or does Sydney have its own legislations?
Update: Thank you everyone!!
4 answers 4