-<?php namespace BookStack\Entities\Repos;
+<?php
+
+namespace BookStack\Entities\Repos;
use BookStack\Actions\ActivityType;
use BookStack\Entities\Models\Book;
$this->baseRepo->create($shelf, $input);
$this->updateBooks($shelf, $bookIds);
Activity::addForEntity($shelf, ActivityType::BOOKSHELF_CREATE);
+
return $shelf;
}
}
Activity::addForEntity($shelf, ActivityType::BOOKSHELF_UPDATE);
+
return $shelf;
}
$syncData = Book::visible()
->whereIn('id', $bookIds)
- ->get(['id'])->pluck('id')->mapWithKeys(function ($bookId) use ($numericIDs) {
+ ->pluck('id')
+ ->mapWithKeys(function ($bookId) use ($numericIDs) {
return [$bookId => ['order' => $numericIDs->search($bookId)]];
});
/**
* Update the given shelf cover image, or clear it.
+ *
* @throws ImageUploadException
* @throws Exception
*/
/**
* Remove a bookshelf from the system.
+ *
* @throws Exception
*/
public function destroy(Bookshelf $shelf)