Instead of using find()
you should use paginate()
like this:
$list = $this->mapper->paginate(2, 5, array('userid=?', F3::get('userid')));
Check out the docs, it's quite easy to use. The result is different than find()
, though, since it contains more info. The items returned will be in $list['subset']. You can do a var_dump of $list to see the other fields returned.