public function delete($id) { $course = new CourseRepository($id); $course->delete(); set_message_success('Kelas berhasil dihapus'); redirect('dashboard', 'refresh'); }
public function deleteComment($course_id, $chapter_id, $comment_id) { $repository = new CourseRepository($course_id); $repository->deleteChapterComment($comment_id); set_message_success('Komentar berhasil dihapus'); redirect('dashboard/course/edit/' . $course_id . '/comment?status=publish', 'refresh'); }