Added pagination to PostController