Beispiel #1
0
 /**
  * Find many posts by category.
  *
  * @param CategoryInterface $category
  * @param null              $limit
  * @return EntryCollection
  */
 public function findManyByCategory(CategoryInterface $category, $limit = null)
 {
     return $this->model->live()->where('category_id', $category->getId())->paginate($limit);
 }
 /**
  * Find many posts by category.
  *
  * @param CategoryInterface $category
  * @param null              $limit
  * @return EntryCollection
  */
 public function findManyByCategory(CategoryInterface $category, $limit = null)
 {
     return $this->model->orderBy('created_at', 'DESC')->where('category_id', $category->getId())->paginate($limit);
 }