Skip to content

Commit

Permalink
Pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebacker committed Apr 4, 2019
1 parent f329a73 commit e56d535
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Http/Controllers/PublicController.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ public function __construct(EloquentNews $news)
*/
public function index()
{
$page = request('page');
$perPage = config('typicms.news.per_page');
$models = $this->repository->paginate($perPage, ['*'], 'page', $page);
$models = $this->repository->paginate(config('typicms.news.per_page'));

return view('news::public.index')
->with(compact('models'));
Expand Down

0 comments on commit e56d535

Please sign in to comment.