Added cross-book page/chapter sorting

This commit is contained in:
Dan Brown
2015-09-06 14:35:53 +01:00
parent 411c331a62
commit e449f25cc8
12 changed files with 239 additions and 129 deletions

View File

@ -80,4 +80,15 @@ class ChapterRepo
return $chapters;
}
public function setBookId($bookId, Chapter $chapter)
{
$chapter->book_id = $bookId;
foreach($chapter->activity as $activity) {
$activity->book_id = $bookId;
$activity->save();
}
$chapter->save();
return $chapter;
}
}