Answer the question
In order to leave comments, you need to log in
What characters can break encoding in json?
There is api for yii2. In the afterSave() method
$record = [
'reservationId' => $this->id,
'reservationStatus' => $this->getModeTitle(),
'message' => $message,
'emailedGuest' => $emailSent,
'userId' => $userId,
'user' => $fullName,
'type' => $type ? $type : 0,
];
if ($paymentId) {
$record['paymentId'] = $paymentId;
}
if (isset($subject)) {
$record['subject'] = $subject;
$record['body'] = $body;
}
Yii::info($record, System::LOG_BOOKING);
{"reservationId":1981,"reservationStatus":"Balance Receipted","message":"New SMS received from guest","emailedGuest":true,"userId":1,"user":"System Service","type":0,"subject":"SMS","body":"That's great. Thx u. So I could wrk while on holiday
. Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question