X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a24f3d7d4759df6b509533daaa1c9686a074e9fe..refs/pull/524/head:/app/Repos/UserRepo.php diff --git a/app/Repos/UserRepo.php b/app/Repos/UserRepo.php index 22c92f3ce..c3546a442 100644 --- a/app/Repos/UserRepo.php +++ b/app/Repos/UserRepo.php @@ -168,13 +168,13 @@ class UserRepo public function getRecentlyCreated(User $user, $count = 20) { return [ - 'pages' => $this->entityRepo->getRecentlyCreatedPages($count, 0, function ($query) use ($user) { + 'pages' => $this->entityRepo->getRecentlyCreated('page', $count, 0, function ($query) use ($user) { $query->where('created_by', '=', $user->id); }), - 'chapters' => $this->entityRepo->getRecentlyCreatedChapters($count, 0, function ($query) use ($user) { + 'chapters' => $this->entityRepo->getRecentlyCreated('chapter', $count, 0, function ($query) use ($user) { $query->where('created_by', '=', $user->id); }), - 'books' => $this->entityRepo->getRecentlyCreatedBooks($count, 0, function ($query) use ($user) { + 'books' => $this->entityRepo->getRecentlyCreated('book', $count, 0, function ($query) use ($user) { $query->where('created_by', '=', $user->id); }) ];