How pagination works with laravel

Currently search show a empty page on clicking pagination.
Here is the stackoverlow question https://stackoverflow.com/questions/53865030/how-to-work-with-pagination-in-laravel-algolia-serach/53865329#53865329