Paginator Helper in CakePHP

Cake php provide inbuilt pagination we can use this by using Paginator Helper. To use pagination first we need to use Paginator Component

public $components = array(‘Paginator’,’Auth’);

now add the below code in your controller here i am using pagination for users table

    public function index() {
        $this->User->recursive = 0;
        $this->set('users', $this->Paginator->paginate());
    }

– See full Blog at: Paginator Helper in CakePHP

FindNerd is the right place to resolve PHP language problems. Here you can post PHP Questions and Answers.

If you have any query on PHP language, Post it at FindNerd’sPHP Developer Forum.

Advertisements
Paginator Helper in CakePHP

One thought on “Paginator Helper in CakePHP

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s