{"action":"opened","issue":{"url":"https://api.github.com/repos/selahattinunlu/laravel-api-query-builder/issues/9","repository_url":"https://api.github.com/repos/selahattinunlu/laravel-api-query-builder","labels_url":"https://api.github.com/repos/selahattinunlu/laravel-api-query-builder/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/selahattinunlu/laravel-api-query-builder/issues/9/comments","events_url":"https://api.github.com/repos/selahattinunlu/laravel-api-query-builder/issues/9/events","html_url":"https://github.com/selahattinunlu/laravel-api-query-builder/issues/9","id":187694218,"number":9,"title":"Previous and next page urls in pagination response","user":{"login":"tttwb","id":20662079,"avatar_url":"https://avatars.githubusercontent.com/u/20662079?v=3","gravatar_id":"","url":"https://api.github.com/users/tttwb","html_url":"https://github.com/tttwb","followers_url":"https://api.github.com/users/tttwb/followers","following_url":"https://api.github.com/users/tttwb/following{/other_user}","gists_url":"https://api.github.com/users/tttwb/gists{/gist_id}","starred_url":"https://api.github.com/users/tttwb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tttwb/subscriptions","organizations_url":"https://api.github.com/users/tttwb/orgs","repos_url":"https://api.github.com/users/tttwb/repos","events_url":"https://api.github.com/users/tttwb/events{/privacy}","received_events_url":"https://api.github.com/users/tttwb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-07T12:01:01Z","updated_at":"2016-11-07T12:01:01Z","closed_at":null,"body":"When making a query to an end point that returns all the data for the current user if there are no filters but then only returns a subset with filters applied e.g:\r\n```\r\nhttp://example.com/api/orders?status=completed&dispatched=1&date_from=01-10-2016&date_to=01-11-2016&page=1\r\n```\r\n\r\nThe response pagination data for the next and previous pages do not include any of the filters from the original request, so if using these to change page it will return all the data with no filters.\r\n\r\n```\r\n{\r\n  \"data\": {\r\n    \"total\": 100,\r\n    \"per_page\": 15,\r\n    \"current_page\": 2,\r\n    \"last_page\": 7,\r\n    \"next_page_url\": \"http://example.com/api/orders?page=3\",\r\n    \"prev_page_url\": \"http://example.com/api/orders?page=1\",\r\n    \"from\": 16,\r\n    \"to\": 30,\r\n    \"data\": [.....]\r\n  }\r\n}\r\n```\r\n\r\nIs there a way to make the next_page_url and prev_page_url include all the same filters with simply the page = 2 etc?"}}
{"actor":{"display_login":"tttwb"}}