public function actionMessengerisread() { $messengerRecord = messenger::find()->all(); foreach ($messengerRecord as $messengerRecord) { $messengerRecord->read_chk = 1; $messengerRecord->save(); } exit; }