/** * Finds user by [[username]] * * @return User|null */ public function getUser() { if ($this->_user === false) { $this->_user = AgMerch::findByUsername($this->username); } return $this->_user; }
public function actionList() { /* $model = new User(); $dataProvider = new ActiveDataProvider([ 'query' => $model->find(); 'pagination' => [ 'pagesize' => '10', ] ]);*/ $query = AgMerch::find(); $dataProvider = new ActiveDataProvider(['query' => $query, 'pagination' => ['pagesize' => '1']]); return $this->render('list', ['dataProvider' => $dataProvider]); }