public function addChapter($name, $content, $attachments = [], $quiz = [])
 {
     $chapter = Chapter::fill(compact('name', 'content'));
     $chapter->course()->associate($this->model);
     $chapter->save();
     if (!is_dir($chapter->content_path)) {
         mkdir($chapter->content_path, 0775);
     }
     if (count($attachments)) {
     }
     $quiz = Quiz::create(['name' => '', 'time' => 0]);
     $quiz->chapter()->associate($chapter);
     $quiz->save();
     foreach ($quiz as $question) {
         $this->addChapterQuiz($chapter, $question);
     }
 }