using a manual that http://fatfreeframework.com/databases#navigation-and-pagination, I can not understand how to create a paginator ... there are examples of?
Not sure if this will help you directly, but there's an error in the sample code:
// get all items for current page
$articleList = $article->paginate($pages->getItemOffset(),$items_per_page
NULL, array('sort' => 'headline asc'));
There is a comma missing after $items_per_page
, so the correct code is:
// get all items for current page
$articleList = $article->paginate(
$pages->getItemOffset(),
$items_per_page,
NULL,
[
'sort' => 'headline asc'
]
);
NULL
is where you can specify a search filter criteria array. This worked for me.