2019-12-28 22:58:07 +08:00
|
|
|
<?php namespace BookStack\Http\Controllers\Api;
|
|
|
|
|
|
|
|
use BookStack\Entities\Book;
|
|
|
|
|
|
|
|
class BooksApiController extends ApiController
|
|
|
|
{
|
2020-01-02 00:33:47 +08:00
|
|
|
public $validation = [
|
|
|
|
'create' => [
|
|
|
|
// TODO
|
|
|
|
],
|
|
|
|
'update' => [
|
|
|
|
// TODO
|
|
|
|
],
|
|
|
|
];
|
|
|
|
|
2019-12-28 22:58:07 +08:00
|
|
|
/**
|
|
|
|
* Get a listing of books visible to the user.
|
|
|
|
*/
|
|
|
|
public function index()
|
|
|
|
{
|
|
|
|
$books = Book::visible();
|
|
|
|
return $this->apiListingResponse($books, [
|
|
|
|
'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by',
|
|
|
|
'restricted', 'image_id',
|
|
|
|
]);
|
|
|
|
}
|
2020-01-02 00:33:47 +08:00
|
|
|
|
|
|
|
public function create()
|
|
|
|
{
|
|
|
|
// TODO -
|
|
|
|
}
|
|
|
|
|
|
|
|
public function read()
|
|
|
|
{
|
|
|
|
// TODO -
|
|
|
|
}
|
|
|
|
|
|
|
|
public function update()
|
|
|
|
{
|
|
|
|
// TODO -
|
|
|
|
}
|
|
|
|
|
|
|
|
public function delete()
|
|
|
|
{
|
|
|
|
// TODO -
|
|
|
|
}
|
2019-12-28 22:58:07 +08:00
|
|
|
}
|