summary, 0, 36); $questionRepo = new QuestionRepo(); $question = $questionRepo->findById($answer->question_id); $notification = new NotificationModel(); $notification->sender_id = $sender->id; $notification->receiver_id = $answer->owner_id; $notification->event_id = $answer->id; $notification->event_type = NotificationModel::TYPE_ANSWER_ACCEPTED; $notification->event_info = [ 'question' => ['id' => $question->id, 'title' => $question->title], 'answer' => ['id' => $answer->id, 'summary' => $answerSummary], ]; $notification->create(); } }