There's different ways to interpret that passage.
It could easily interpreted to mean that by living by god's laws in all you do, you give glory to him.
It could easily interpreted to mean that by living by god's laws in all you do, you give glory to him.