Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.73 KB | None | 0 0
  1. >>>>>>>>>Controler
  2. public function actionFriends()
  3.     {
  4.             $userId = Yii::app()->user->id;
  5.         $this->dataProvider=new CActiveDataProvider('User', array(
  6.                     'pagination'=>array(
  7.                         'pageSize'=>Yii::app()->params['postsPerPage'],
  8.                         ),
  9.                     'criteria'=>array(
  10.                         'condition'=>"friend.user_id={$userId}",
  11.                         'order'=>'t.created DESC',
  12.                         'with'=>array('friends'),
  13.                         ),
  14.                     ));
  15.  
  16.         $this->render('//friend/index',array(
  17.             'dataProvider'=>$this->dataProvider,
  18.         ));
  19.     }
  20.  
  21.  
  22. >>>>>>>>>>>>>>>>>>IN VIEW
  23.  
  24. echo '<pre>';
  25. var_dump($data->skwigleCount);exit;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement