Hi, In my controller, every controller, when I try to set the pagination on the query always fails whit this error:
**# Argument 1 passed to Cake\Datasource\Paginator::extractData() must implement interface Cake\Datasource\RepositoryInterface, instance of Cake\ORM\ResultSet given, called in /share/CACHEDEV1_DATA/htdocs/alterecoGEST/vendor/cakephp/cakephp/src/Datasource/Paginator.php on line 176
my controller
src/Controller/AnagclientiController.php
public function index()
{
$this->loadComponent('Paginator');
$clienti=$this->Paginator->paginate($this->Anagclienti->find('all',['order'=>'Anagclienti.ragione_sociale'])->all());
$this->set('clienti',$clienti);
}
Can someone help me?