findById($userId); if (!$account->phone) { return false; } $chapterRepo = new ChapterRepo(); $chapter = $chapterRepo->findById($chapterId); $courseRepo = new CourseRepo(); $course = $courseRepo->findById($chapter->course_id); $params = [ $course->title, $chapter->title, $startTime, ]; $templateId = $this->getTemplateId($this->templateCode); return $this->send($account->phone, $templateId, $params); } }