content, 0, 32); $notification = new NotificationModel(); $notification->sender_id = $sender->id; $notification->receiver_id = $comment->owner_id; $notification->event_id = $comment->id; $notification->event_type = NotificationModel::TYPE_COMMENT_LIKED; $notification->event_info = [ 'sender' => ['id' => $sender->id, 'name' => $sender->name], 'comment' => ['id' => $comment->id, 'content' => $commentContent], ]; $notification->create(); } }