Added limit to books shown on homepage and make alphabetical

This commit is contained in:
Dan Brown
2015-11-09 20:39:06 +00:00
parent e5b9be2e76
commit 76eb8fc5d7
3 changed files with 6 additions and 3 deletions

View File

@ -25,9 +25,9 @@ class BookRepo
return $this->book->findOrFail($id);
}
public function getAll()
public function getAll($count = 10)
{
return $this->book->all();
return $this->book->orderBy('name', 'asc')->take($count)->get();
}
/**