How to include First and Last link to CakePHP Pagination

Open your .ctp file from app/views folder, locate

<div>
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
|     <?php echo $paginator->numbers();?>
<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class'=>'disabled'));?>
</div>
and add following lines to the existing code:
<?php echo $paginator->first();?>
<?php echo $paginator->last();?>

Now the paging div should be like following:

<div>
<?php echo $paginator->first();?>
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
|     <?php echo $paginator->numbers();?>
<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class'=>'disabled'));?>
<?php echo $paginator->last();?>
</div>