-<?php namespace BookStack\Entities\Repos;
+<?php
+
+namespace BookStack\Entities\Repos;
use BookStack\Actions\ActivityType;
use BookStack\Actions\TagRepo;
class BookRepo
{
-
protected $baseRepo;
protected $tagRepo;
protected $imageRepo;
}
/**
- * Create a new book in the system
+ * Create a new book in the system.
*/
public function create(array $input): Book
{
$book = new Book();
$this->baseRepo->create($book, $input);
Activity::addForEntity($book, ActivityType::BOOK_CREATE);
+
return $book;
}
{
$this->baseRepo->update($book, $input);
Activity::addForEntity($book, ActivityType::BOOK_UPDATE);
+
return $book;
}
/**
* Update the given book's cover image, or clear it.
+ *
* @throws ImageUploadException
* @throws Exception
*/
/**
* Remove a book from the system.
+ *
* @throws Exception
*/
public function destroy(Book $book)