In the controller file like I have Employeecontroller.php, write the following code: <?php class EmployeeController extends AppController { public $paginate = array( ‘limit’ => 2, ‘order’ => array( ‘Employee.id’ => ‘asc’ ) ); public function index() { $data = $this->paginate(‘Employee’); $this->set(‘employeeList’, $data); } } ?> Now in the view file like I have index.ctp, write […]Image may be NSFW.
Clik here to view.
Clik here to view.
