$this->validate($request, [
'name' => 'required|string|max:255',
'description' => 'string|max:1000',
$this->validate($request, [
'name' => 'required|string|max:255',
'description' => 'string|max:1000',
]);
$bookIds = explode(',', $request->get('books', ''));
$shelf = $this->bookshelfRepo->create($request->all(), $bookIds);
]);
$bookIds = explode(',', $request->get('books', ''));
$shelf = $this->bookshelfRepo->create($request->all(), $bookIds);
Activity::add($shelf, 'bookshelf_create');
return redirect($shelf->getUrl());
Activity::add($shelf, 'bookshelf_create');
return redirect($shelf->getUrl());
$this->checkOwnablePermission('book-view', $shelf);
Views::add($shelf);
$this->entityContextManager->setShelfContext($shelf->id);
$this->checkOwnablePermission('book-view', $shelf);
Views::add($shelf);
$this->entityContextManager->setShelfContext($shelf->id);
$this->setPageTitle($shelf->getShortName());
return view('shelves.show', [
$this->setPageTitle($shelf->getShortName());
return view('shelves.show', [
$this->validate($request, [
'name' => 'required|string|max:255',
'description' => 'string|max:1000',
$this->validate($request, [
'name' => 'required|string|max:255',
'description' => 'string|max:1000',