$this->validate($request, [
'name' => 'required|string|max:255',
'description' => 'string|max:1000',
- 'image' => $this->getImageValidationRules(),
+ 'image' => 'nullable|' . $this->getImageValidationRules(),
]);
$bookshelf = null;
{
$book = $this->bookRepo->getBySlug($slug);
$bookChildren = (new BookContents($book))->getTree(true);
+ $bookParentShelves = $book->shelves()->visible();
Views::add($book);
if ($request->has('shelf')) {
'book' => $book,
'current' => $book,
'bookChildren' => $bookChildren,
+ 'bookParentShelves' => $bookParentShelves,
'activity' => Activity::entityActivity($book, 20, 1)
]);
}
$this->validate($request, [
'name' => 'required|string|max:255',
'description' => 'string|max:1000',
- 'image' => $this->getImageValidationRules(),
+ 'image' => 'nullable|' . $this->getImageValidationRules(),
]);
$book = $this->bookRepo->update($book, $request->all());