$this->validate($request, [
'name' => 'required|string|max:255',
'description' => 'string|max:1000',
- 'image' => $this->getImageValidationRules(),
+ 'image' => 'nullable|' . $this->getImageValidationRules(),
]);
$bookIds = explode(',', $request->get('books', ''));
Views::add($shelf);
$this->entityContextManager->setShelfContext($shelf->id);
+ $view = setting()->getForCurrentUser('bookshelf_view_type', config('app.views.books'));
$this->setPageTitle($shelf->getShortName());
return view('shelves.show', [
'shelf' => $shelf,
+ 'view' => $view,
'activity' => Activity::entityActivity($shelf, 20, 1)
]);
}
$this->validate($request, [
'name' => 'required|string|max:255',
'description' => 'string|max:1000',
- 'image' => $this->getImageValidationRules(),
+ 'image' => 'nullable|' . $this->getImageValidationRules(),
]);