예제 #1
0
 public function delete($id)
 {
     $course = new CourseRepository($id);
     $course->delete();
     set_message_success('Kelas berhasil dihapus');
     redirect('dashboard', 'refresh');
 }
예제 #2
0
 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');
 }