[Yii]Pagination with model

Riazul Karim Ivan

When i generate CURD , the pagination is 10.

If i want to change this pagination, there is a way for changing this from corresponding model.

In model, we have to change the search function.

public function search()

For this function return is;

return new CActiveDataProvider($this, array(

We have to change the this CActiveDataProvider.

return new CActiveDataProvider($this, array(
‘pagination’ => array(
                        ‘pageSize’ => 20,

View original post


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s