Controller For the pagination

This is controller for the pagination