I'm upgrading my cakephp1.x project to cakephp2.10.12. I got below error when I try to apply pagination to my view
Error
Call to undefined method PaginatorComponent::paginate()
My controller code like this
App::uses('Controller', 'Controller');
class ProductsController extends AppController {
var $name = "Product";
var $helpers = array('Html', 'Form','Paginator','Js');
var $paginate = array('limit' => 25,'order' => array('Product.pname' => 'asc'));
function allproducts() {
$this->paginate = array(
'conditions' => array("Product.status" => 'A','Product.stock >' => 0),
);
$this->Paginator->settings = $this->paginate;
list($order,$limit,$page) = $this->paginate(); // Added