Override the CakePHP Maximum of 100 Records in Pagination:
Override the CakePHP Maximum of 100 Records in Pagination:
In the example below, we want to return 500 records per page:
$this->loadModel('ProjectFiles'); $projectFiles = $this->ProjectFiles->find('all', [ 'order' => ['ProjectFiles.created' => 'DESC', 'ProjectFiles.file_name' => 'ASC'], 'contain' => ['Projects'], 'conditions' => [], ], [ 'limit' => 500 ]); $projectFiles = $this->paginate($projectFiles, ['limit'=> 500, 'maxLimit' => 500]); $this->set(compact('projectFiles'));