[verb (plain, non-past)] + ように言う [verb ない form] + ように言う
Common pattern: Person は + Person に + [verb (plain)] + ように言う
Note: 言う can be replaced with 頼む, 伝える, 注意する, etc.
The grammar pattern ように言う is used to express that someone tells, asks, or orders someone to do (or not do) something. It is used for indirect speech – reporting instructions, requests, or commands – rather than quoting someone's exact words.
The verb before ように is in its plain form (dictionary form for positive, ない form for negative).
とゆう言う is used for direct quotation – reporting someone's exact words. ように言う is used for indirect reporting of instructions or requests.
Compare:
While ゆう言う is the most common verb used with this pattern, it also works with other verbs of communication such as たのむ頼む (to ask/request), ちゅうい注意する (to warn/caution), and つたえる伝える (to convey/pass on a message).
The verb ゆう言う at the end of the sentence can be conjugated into any tense or politeness level: いった言った, いいました言いました, いわれた言われた, etc.