you can just give not executed (no ->toArray(), ->toList() ->first() ->all()) Query as argument
i.e.
$query = $this->Users->find()->where(['status' => 'active']);
$this->paginate($query);
you can just give not executed (no ->toArray(), ->toList() ->first() ->all()) Query as argument
i.e.
$query = $this->Users->find()->where(['status' => 'active']);
$this->paginate($query);