mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-02 23:56:56 +08:00
Added cross-book page/chapter sorting
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user