{"action":"closed","issue":{"url":"https://api.github.com/repos/sedp-mis/base-repository/issues/2","repository_url":"https://api.github.com/repos/sedp-mis/base-repository","labels_url":"https://api.github.com/repos/sedp-mis/base-repository/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/sedp-mis/base-repository/issues/2/comments","events_url":"https://api.github.com/repos/sedp-mis/base-repository/issues/2/events","html_url":"https://github.com/sedp-mis/base-repository/issues/2","id":165903889,"number":2,"title":"Add feature paginate()","user":{"login":"ajcastro","id":4918318,"avatar_url":"https://avatars.githubusercontent.com/u/4918318?v=3","gravatar_id":"","url":"https://api.github.com/users/ajcastro","html_url":"https://github.com/ajcastro","followers_url":"https://api.github.com/users/ajcastro/followers","following_url":"https://api.github.com/users/ajcastro/following{/other_user}","gists_url":"https://api.github.com/users/ajcastro/gists{/gist_id}","starred_url":"https://api.github.com/users/ajcastro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajcastro/subscriptions","organizations_url":"https://api.github.com/users/ajcastro/orgs","repos_url":"https://api.github.com/users/ajcastro/repos","events_url":"https://api.github.com/users/ajcastro/events{/privacy}","received_events_url":"https://api.github.com/users/ajcastro/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-16T02:17:24Z","updated_at":"2016-07-18T01:36:40Z","closed_at":"2016-07-18T01:36:40Z","body":"### Interface\r\n```\r\n/**\r\n * Returns paginated models.\r\n */\r\npublic function paginate($rows, $filters = [], $sort = [], $presenter = null);\r\n\r\n/**\r\n * This will create an instance of the paginator with the set query \r\n * base from the filters and sort rules.\r\n */\r\npublic function paginator($filters = [], $sort = []);\r\n```\r\n\r\n### Filters, supported operators: `=`, `!=`, `>`, `<`, `>=`, `<=`\r\n```\r\n$filters = [\r\n  <attribute> => [...<rules>],\r\n  ...\r\n];\r\n\r\n$filters = [\r\n  'version' => [\r\n    '='  => ['1.0.0',  '~0.1'],\r\n    '!=' => ['2.0.1',  '~3.0'],\r\n    '>'  => [5, 9, 12] \r\n  ]\r\n];\r\n```\r\n\r\n### Sort\r\n```\r\n$sort = [\r\n  <attribute> => <rule>,\r\n  ...\r\n];\r\n\r\n$sort = [\r\n  'version' => 'asc'\r\n];\r\n```\r\n\r\n### Presenter, see https://laravel.com/docs/4.2/pagination#custom-presenters"}}
{"actor":{"display_login":"ajcastro"}}