X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/60d0f96cd754a85c637a5f34dcc0341f4ef72a46..refs/pull/1688/head:/app/Entities/Repos/BookRepo.php diff --git a/app/Entities/Repos/BookRepo.php b/app/Entities/Repos/BookRepo.php index c82780fea..91bc9a1b4 100644 --- a/app/Entities/Repos/BookRepo.php +++ b/app/Entities/Repos/BookRepo.php @@ -3,9 +3,7 @@ namespace BookStack\Entities\Repos; - use BookStack\Entities\Book; -use BookStack\Entities\Bookshelf; use BookStack\Exceptions\NotFoundException; use BookStack\Exceptions\NotifyException; @@ -25,21 +23,6 @@ class BookRepo extends EntityRepo return $book; } - /** - * Append a Book to a BookShelf. - * @param Bookshelf $shelf - * @param Book $book - */ - public function appendBookToShelf(Bookshelf $shelf, Book $book) - { - if ($shelf->contains($book)) { - return; - } - - $maxOrder = $shelf->books()->max('order'); - $shelf->books()->attach($book->id, ['order' => $maxOrder + 1]); - } - /** * Destroy the provided book and all its child entities. * @param Book $book