Casting total_items to int in QueryBuilder paginator