Advertisement
Guest User

cakephp paginate Problim on cakephp 3.2.8

a guest
May 6th, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.56 KB | None | 0 0
  1. /**
  2.      *
  3.      */
  4.     public function myarticles()
  5.     {
  6.         $this->paginate['Articles']['order'] = ['Articles.created, Articles.modified  DESC'];
  7.         $this->paginate['Articles']['contain'] =
  8.             [
  9.                 'ArticleCategories',
  10.                 'Users',
  11.                 'Tags',
  12.             ];
  13.  
  14.  
  15.         $data['user_id'] = $this->UserId;
  16.         $this->paginate['Articles']['finder'] = ['MyArticles' => $data];
  17.         $this->set('articles', $this->paginate($this->Articles));
  18.         $this->set('_serialize', ['articles']);
  19.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement