mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-24 11:52:34 +01:00
Made books and shelf listing views slightly more efficient
This commit is contained in:
parent
d0a7a8b890
commit
da7c686541
@ -35,7 +35,7 @@ class BookRepo
|
||||
*/
|
||||
public function getAllPaginated(int $count = 20, string $sort = 'name', string $order = 'asc'): LengthAwarePaginator
|
||||
{
|
||||
return Book::visible()->orderBy($sort, $order)->paginate($count);
|
||||
return Book::visible()->with('cover')->orderBy($sort, $order)->paginate($count);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,7 +30,7 @@ class BookshelfRepo
|
||||
public function getAllPaginated(int $count = 20, string $sort = 'name', string $order = 'asc'): LengthAwarePaginator
|
||||
{
|
||||
return Bookshelf::visible()
|
||||
->with('visibleBooks')
|
||||
->with(['visibleBooks', 'cover'])
|
||||
->orderBy($sort, $order)
|
||||
->paginate($count);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user