New `paginate()` function to generate pagination based on queries.
Better way to get dynamic properties