Cakephp paginator array error -
i'm new cakephp , have question controller:
function showmy($userid) { return $this->voucher->find('all', array('conditions' => array('voucher.user_id' => $userid))); } public function index() { $this->voucher->recursive = 0; $userid = $this->session->read('auth.user.id'); $this->set('vouchers', $this->showmy($userid )); } i want voucher user_id loged in user.
it works, many errors :
warning (2): array_filter() expects parameter 1 array, null given [core\cake\view\helper\paginatorhelper.php, line 419] maybe more experienced give me advice!
thanks, julius
i think need use paginatorcomponent::paginate() able use paginatorhelper in view. more info in manual.
Comments
Post a Comment