From dc2bfcb6b2a0cc7d964f951b8e8310407d715f3e Mon Sep 17 00:00:00 2001 From: Sami Mokaddem Date: Fri, 21 Jan 2022 09:35:55 +0100 Subject: [PATCH] fix: [components:CRUD] Support of controller's paginate public variable --- src/Controller/Component/CRUDComponent.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/Component/CRUDComponent.php b/src/Controller/Component/CRUDComponent.php index d1c78fc..316168e 100644 --- a/src/Controller/Component/CRUDComponent.php +++ b/src/Controller/Component/CRUDComponent.php @@ -88,7 +88,7 @@ class CRUDComponent extends Component $this->Controller->restResponsePayload = $this->RestResponse->viewData($data, 'json'); } else { $this->Controller->loadComponent('Paginator'); - $data = $this->Controller->Paginator->paginate($query); + $data = $this->Controller->Paginator->paginate($query, $this->Controller->paginate ?? []); if (isset($options['afterFind'])) { $function = $options['afterFind']; if (is_callable($options['afterFind'])) {