Update pagination.php

Added Factory