public destroy ( $bookSlug ) : Response | ||
$bookSlug | ||
return | Response |
public function destroy($bookSlug)
{
$book = $this->bookRepo->getBySlug($bookSlug);
$this->checkOwnablePermission('book-delete', $book);
Activity::addMessage('book_delete', 0, $book->name);
Activity::removeEntity($book);
$this->bookRepo->destroy($book);
return redirect('/books');
}