1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Fixed draft time display, Cleaned up some code

Cleaned up some comment spacing in book controller and refactored some of the view service functions.
This commit is contained in:
Dan Brown
2016-04-09 14:26:42 +01:00
parent a33deed26b
commit d6bad01130
4 changed files with 10 additions and 29 deletions

View File

@ -84,7 +84,7 @@ class EntityRepo
if ($additionalQuery !== false && is_callable($additionalQuery)) {
$additionalQuery($query);
}
return $query->skip($page * $count)->take($count)->get();
return $query->with('book')->skip($page * $count)->take($count)->get();
}
/**
@ -114,7 +114,7 @@ class EntityRepo
{
return $this->restrictionService->enforcePageRestrictions($this->page)
->where('draft', '=', false)
->orderBy('updated_at', 'desc')->skip($page * $count)->take($count)->get();
->orderBy('updated_at', 'desc')->with('book')->skip($page * $count)->take($count)->get();
}
/**