Update phrase by code

Status
This content is read-only, or is not open for further replies.

FoxSecrets

Guest
offline
How can I update any phrase by code?

I tried directly, I can see the phrase updated in database, but not in template. How to do it correctly?


Code:

Code:
$phrase = \XF::finder('XF:Phrase')->where('title', '=', 'xxxxxxxx')->fetchOne();

if ($phrase) {
    $phrase->phrase_text = 'my phrase';
    $phrase->save();
}

Continue reading...
 
Liked by:
Status
This content is read-only, or is not open for further replies.
Top Bottom