Learner\Repositories\BlogRepositoryInterface::findAllPublishedPaginated PHP Méthode

findAllPublishedPaginated() public méthode

Paginate all published blogs.
public findAllPublishedPaginated ( $perPage = 10 ) : Illuminate\Contracts\Pagination\LengthAwarePaginator
Résultat Illuminate\Contracts\Pagination\LengthAwarePaginator
    public function findAllPublishedPaginated($perPage = 10);

Usage Example

 /**
  * Get all published blogs.
  *
  * /blogs get
  *
  * @return \Illuminate\View\View
  */
 public function index()
 {
     $blogs = $this->blogs->findAllPublishedPaginated(10);
     return view('blogs.index', compact('blogs'));
 }