Gepostet im Juni, 2018


CakePHP allows to paginate multiple models in a single controller action, using the scope option – but if you want to paginate the same model multiple times, this is not supported. The solution: generate different models (on the fly) for using it to paginate: In the controller: $this->loadModel('Members'); $paginator1 = $this->paginate( $this->Members->find()->where(['tag' => 1]), [ 'model' => 'Members', 'scope' => 'scope1' ] );...

Mehr