diff --git a/en/controllers/components/pagination.rst b/en/controllers/components/pagination.rst index 1b242c779e..95e7a9afb9 100644 --- a/en/controllers/components/pagination.rst +++ b/en/controllers/components/pagination.rst @@ -189,8 +189,15 @@ Paginating Multiple Queries =========================== You can paginate multiple models in a single controller action, using the -``scope`` option:: +``scope`` option both in the controller's ``$paginate`` property and in the +call to the ``paginate()`` method:: + // Paginate property + public $paginate = [ + 'Articles' => ['scope' => 'article'], + 'Tags' => ['scope' => 'tag'] + ]; + // In a controller action $articles = $this->paginate($this->Articles, ['scope' => 'article']); $tags = $this->paginate($this->Tags, ['scope' => 'tag']);