In the “Pagination” section of the Cookbook article „Generating JSON“ and also below in “The entire code”:
$json['pages'] = $data->pagination()->countPages();
countPages()
throws an error, also I can’t find it anywhere else in the docs.
Shouldn’t it be $pagination->pages()
?