use BookStack\Entities\Book;
use BookStack\Entities\Repos\BookRepo;
+use BookStack\Exceptions\NotifyException;
use BookStack\Facades\Activity;
+use Illuminate\Contracts\Container\BindingResolutionException;
use Illuminate\Http\Request;
+use Illuminate\Validation\ValidationException;
class BooksApiController extends ApiController
{
/**
* Get a listing of books visible to the user.
*/
- public function index()
+ public function list()
{
$books = Book::visible();
return $this->apiListingResponse($books, [
}
/**
- * Create a new book.
- * @throws \Illuminate\Validation\ValidationException
+ * Create a new book in the system.
+ * @throws ValidationException
*/
public function create(Request $request)
{
/**
* Update the details of a single book.
- * @throws \Illuminate\Validation\ValidationException
+ * @throws ValidationException
*/
public function update(Request $request, string $id)
{
}
/**
- * Delete a book from the system.
- * @throws \BookStack\Exceptions\NotifyException
- * @throws \Illuminate\Contracts\Container\BindingResolutionException
+ * Delete a single book from the system.
+ * @throws NotifyException
+ * @throws BindingResolutionException
*/
public function delete(string $id)
{