{"action":"closed","number":12,"pull_request":{"url":"https://api.github.com/repos/flugger/laravel-responder/pulls/12","id":85339521,"html_url":"https://github.com/flugger/laravel-responder/pull/12","diff_url":"https://github.com/flugger/laravel-responder/pull/12.diff","patch_url":"https://github.com/flugger/laravel-responder/pull/12.patch","issue_url":"https://api.github.com/repos/flugger/laravel-responder/issues/12","number":12,"state":"closed","locked":false,"title":"Get actual first item of an array rather than by 0 index when resolving model out of the resource ","user":{"login":"pricecurrent","id":4919983,"avatar_url":"https://avatars.githubusercontent.com/u/4919983?v=3","gravatar_id":"","url":"https://api.github.com/users/pricecurrent","html_url":"https://github.com/pricecurrent","followers_url":"https://api.github.com/users/pricecurrent/followers","following_url":"https://api.github.com/users/pricecurrent/following{/other_user}","gists_url":"https://api.github.com/users/pricecurrent/gists{/gist_id}","starred_url":"https://api.github.com/users/pricecurrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pricecurrent/subscriptions","organizations_url":"https://api.github.com/users/pricecurrent/orgs","repos_url":"https://api.github.com/users/pricecurrent/repos","events_url":"https://api.github.com/users/pricecurrent/events{/privacy}","received_events_url":"https://api.github.com/users/pricecurrent/received_events","type":"User","site_admin":false},"body":"Hello, I found the point where it breaks. When we feed response factory a custom built paginator it fails to resolve model out of the resource because we are manually slicing the collection and when we are on page 2 or 3 we simply don't have an item with `0` index in the array and it's failing to resolve a model. This is not the case when we do `->paginate()` on query builder because it's not slicing a collection, but it adds `limit` and `offset` on actual sql query so we always have 0 indexed element.\r\n","created_at":"2016-09-15T03:10:52Z","updated_at":"2016-09-15T07:22:00Z","closed_at":"2016-09-15T07:21:59Z","merged_at":"2016-09-15T07:21:59Z","merge_commit_sha":"bae9899f4606e9282badbb58eba72ee7136f004c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/flugger/laravel-responder/pulls/12/commits","review_comments_url":"https://api.github.com/repos/flugger/laravel-responder/pulls/12/comments","review_comment_url":"https://api.github.com/repos/flugger/laravel-responder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flugger/laravel-responder/issues/12/comments","statuses_url":"https://api.github.com/repos/flugger/laravel-responder/statuses/3109a8d455bb2808da09ed351a467c3071da967a","head":{"label":"pricecurrent:master","ref":"master","sha":"3109a8d455bb2808da09ed351a467c3071da967a","user":{"login":"pricecurrent","id":4919983,"avatar_url":"https://avatars.githubusercontent.com/u/4919983?v=3","gravatar_id":"","url":"https://api.github.com/users/pricecurrent","html_url":"https://github.com/pricecurrent","followers_url":"https://api.github.com/users/pricecurrent/followers","following_url":"https://api.github.com/users/pricecurrent/following{/other_user}","gists_url":"https://api.github.com/users/pricecurrent/gists{/gist_id}","starred_url":"https://api.github.com/users/pricecurrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pricecurrent/subscriptions","organizations_url":"https://api.github.com/users/pricecurrent/orgs","repos_url":"https://api.github.com/users/pricecurrent/repos","events_url":"https://api.github.com/users/pricecurrent/events{/privacy}","received_events_url":"https://api.github.com/users/pricecurrent/received_events","type":"User","site_admin":false},"repo":{"id":68262179,"name":"laravel-responder","full_name":"pricecurrent/laravel-responder","owner":{"login":"pricecurrent","id":4919983,"avatar_url":"https://avatars.githubusercontent.com/u/4919983?v=3","gravatar_id":"","url":"https://api.github.com/users/pricecurrent","html_url":"https://github.com/pricecurrent","followers_url":"https://api.github.com/users/pricecurrent/followers","following_url":"https://api.github.com/users/pricecurrent/following{/other_user}","gists_url":"https://api.github.com/users/pricecurrent/gists{/gist_id}","starred_url":"https://api.github.com/users/pricecurrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pricecurrent/subscriptions","organizations_url":"https://api.github.com/users/pricecurrent/orgs","repos_url":"https://api.github.com/users/pricecurrent/repos","events_url":"https://api.github.com/users/pricecurrent/events{/privacy}","received_events_url":"https://api.github.com/users/pricecurrent/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pricecurrent/laravel-responder","description":"A Laravel package for APIs, wrapping the Fractal library behind an elegant Laravel API.","fork":true,"url":"https://api.github.com/repos/pricecurrent/laravel-responder","forks_url":"https://api.github.com/repos/pricecurrent/laravel-responder/forks","keys_url":"https://api.github.com/repos/pricecurrent/laravel-responder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pricecurrent/laravel-responder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pricecurrent/laravel-responder/teams","hooks_url":"https://api.github.com/repos/pricecurrent/laravel-responder/hooks","issue_events_url":"https://api.github.com/repos/pricecurrent/laravel-responder/issues/events{/number}","events_url":"https://api.github.com/repos/pricecurrent/laravel-responder/events","assignees_url":"https://api.github.com/repos/pricecurrent/laravel-responder/assignees{/user}","branches_url":"https://api.github.com/repos/pricecurrent/laravel-responder/branches{/branch}","tags_url":"https://api.github.com/repos/pricecurrent/laravel-responder/tags","blobs_url":"https://api.github.com/repos/pricecurrent/laravel-responder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pricecurrent/laravel-responder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pricecurrent/laravel-responder/git/refs{/sha}","trees_url":"https://api.github.com/repos/pricecurrent/laravel-responder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pricecurrent/laravel-responder/statuses/{sha}","languages_url":"https://api.github.com/repos/pricecurrent/laravel-responder/languages","stargazers_url":"https://api.github.com/repos/pricecurrent/laravel-responder/stargazers","contributors_url":"https://api.github.com/repos/pricecurrent/laravel-responder/contributors","subscribers_url":"https://api.github.com/repos/pricecurrent/laravel-responder/subscribers","subscription_url":"https://api.github.com/repos/pricecurrent/laravel-responder/subscription","commits_url":"https://api.github.com/repos/pricecurrent/laravel-responder/commits{/sha}","git_commits_url":"https://api.github.com/repos/pricecurrent/laravel-responder/git/commits{/sha}","comments_url":"https://api.github.com/repos/pricecurrent/laravel-responder/comments{/number}","issue_comment_url":"https://api.github.com/repos/pricecurrent/laravel-responder/issues/comments{/number}","contents_url":"https://api.github.com/repos/pricecurrent/laravel-responder/contents/{+path}","compare_url":"https://api.github.com/repos/pricecurrent/laravel-responder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pricecurrent/laravel-responder/merges","archive_url":"https://api.github.com/repos/pricecurrent/laravel-responder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pricecurrent/laravel-responder/downloads","issues_url":"https://api.github.com/repos/pricecurrent/laravel-responder/issues{/number}","pulls_url":"https://api.github.com/repos/pricecurrent/laravel-responder/pulls{/number}","milestones_url":"https://api.github.com/repos/pricecurrent/laravel-responder/milestones{/number}","notifications_url":"https://api.github.com/repos/pricecurrent/laravel-responder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pricecurrent/laravel-responder/labels{/name}","releases_url":"https://api.github.com/repos/pricecurrent/laravel-responder/releases{/id}","deployments_url":"https://api.github.com/repos/pricecurrent/laravel-responder/deployments","created_at":"2016-09-15T02:59:12Z","updated_at":"2016-09-15T02:59:13Z","pushed_at":"2016-09-15T03:03:32Z","git_url":"git://github.com/pricecurrent/laravel-responder.git","ssh_url":"git@github.com:pricecurrent/laravel-responder.git","clone_url":"https://github.com/pricecurrent/laravel-responder.git","svn_url":"https://github.com/pricecurrent/laravel-responder","homepage":null,"size":201,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"flugger:master","ref":"master","sha":"efddcdabab9db269832ff783d76ef1585899722e","user":{"login":"flugger","id":1271812,"avatar_url":"https://avatars.githubusercontent.com/u/1271812?v=3","gravatar_id":"","url":"https://api.github.com/users/flugger","html_url":"https://github.com/flugger","followers_url":"https://api.github.com/users/flugger/followers","following_url":"https://api.github.com/users/flugger/following{/other_user}","gists_url":"https://api.github.com/users/flugger/gists{/gist_id}","starred_url":"https://api.github.com/users/flugger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flugger/subscriptions","organizations_url":"https://api.github.com/users/flugger/orgs","repos_url":"https://api.github.com/users/flugger/repos","events_url":"https://api.github.com/users/flugger/events{/privacy}","received_events_url":"https://api.github.com/users/flugger/received_events","type":"User","site_admin":false},"repo":{"id":61958636,"name":"laravel-responder","full_name":"flugger/laravel-responder","owner":{"login":"flugger","id":1271812,"avatar_url":"https://avatars.githubusercontent.com/u/1271812?v=3","gravatar_id":"","url":"https://api.github.com/users/flugger","html_url":"https://github.com/flugger","followers_url":"https://api.github.com/users/flugger/followers","following_url":"https://api.github.com/users/flugger/following{/other_user}","gists_url":"https://api.github.com/users/flugger/gists{/gist_id}","starred_url":"https://api.github.com/users/flugger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flugger/subscriptions","organizations_url":"https://api.github.com/users/flugger/orgs","repos_url":"https://api.github.com/users/flugger/repos","events_url":"https://api.github.com/users/flugger/events{/privacy}","received_events_url":"https://api.github.com/users/flugger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/flugger/laravel-responder","description":"A Laravel package for APIs, wrapping the Fractal library behind an elegant Laravel API.","fork":false,"url":"https://api.github.com/repos/flugger/laravel-responder","forks_url":"https://api.github.com/repos/flugger/laravel-responder/forks","keys_url":"https://api.github.com/repos/flugger/laravel-responder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flugger/laravel-responder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flugger/laravel-responder/teams","hooks_url":"https://api.github.com/repos/flugger/laravel-responder/hooks","issue_events_url":"https://api.github.com/repos/flugger/laravel-responder/issues/events{/number}","events_url":"https://api.github.com/repos/flugger/laravel-responder/events","assignees_url":"https://api.github.com/repos/flugger/laravel-responder/assignees{/user}","branches_url":"https://api.github.com/repos/flugger/laravel-responder/branches{/branch}","tags_url":"https://api.github.com/repos/flugger/laravel-responder/tags","blobs_url":"https://api.github.com/repos/flugger/laravel-responder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flugger/laravel-responder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flugger/laravel-responder/git/refs{/sha}","trees_url":"https://api.github.com/repos/flugger/laravel-responder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flugger/laravel-responder/statuses/{sha}","languages_url":"https://api.github.com/repos/flugger/laravel-responder/languages","stargazers_url":"https://api.github.com/repos/flugger/laravel-responder/stargazers","contributors_url":"https://api.github.com/repos/flugger/laravel-responder/contributors","subscribers_url":"https://api.github.com/repos/flugger/laravel-responder/subscribers","subscription_url":"https://api.github.com/repos/flugger/laravel-responder/subscription","commits_url":"https://api.github.com/repos/flugger/laravel-responder/commits{/sha}","git_commits_url":"https://api.github.com/repos/flugger/laravel-responder/git/commits{/sha}","comments_url":"https://api.github.com/repos/flugger/laravel-responder/comments{/number}","issue_comment_url":"https://api.github.com/repos/flugger/laravel-responder/issues/comments{/number}","contents_url":"https://api.github.com/repos/flugger/laravel-responder/contents/{+path}","compare_url":"https://api.github.com/repos/flugger/laravel-responder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flugger/laravel-responder/merges","archive_url":"https://api.github.com/repos/flugger/laravel-responder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flugger/laravel-responder/downloads","issues_url":"https://api.github.com/repos/flugger/laravel-responder/issues{/number}","pulls_url":"https://api.github.com/repos/flugger/laravel-responder/pulls{/number}","milestones_url":"https://api.github.com/repos/flugger/laravel-responder/milestones{/number}","notifications_url":"https://api.github.com/repos/flugger/laravel-responder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flugger/laravel-responder/labels{/name}","releases_url":"https://api.github.com/repos/flugger/laravel-responder/releases{/id}","deployments_url":"https://api.github.com/repos/flugger/laravel-responder/deployments","created_at":"2016-06-25T19:36:04Z","updated_at":"2016-09-13T05:57:32Z","pushed_at":"2016-09-15T07:21:59Z","git_url":"git://github.com/flugger/laravel-responder.git","ssh_url":"git@github.com:flugger/laravel-responder.git","clone_url":"https://github.com/flugger/laravel-responder.git","svn_url":"https://github.com/flugger/laravel-responder","homepage":null,"size":200,"stargazers_count":148,"watchers_count":148,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":148,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flugger/laravel-responder/pulls/12"},"html":{"href":"https://github.com/flugger/laravel-responder/pull/12"},"issue":{"href":"https://api.github.com/repos/flugger/laravel-responder/issues/12"},"comments":{"href":"https://api.github.com/repos/flugger/laravel-responder/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/flugger/laravel-responder/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/flugger/laravel-responder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flugger/laravel-responder/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/flugger/laravel-responder/statuses/3109a8d455bb2808da09ed351a467c3071da967a"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"flugger","id":1271812,"avatar_url":"https://avatars.githubusercontent.com/u/1271812?v=3","gravatar_id":"","url":"https://api.github.com/users/flugger","html_url":"https://github.com/flugger","followers_url":"https://api.github.com/users/flugger/followers","following_url":"https://api.github.com/users/flugger/following{/other_user}","gists_url":"https://api.github.com/users/flugger/gists{/gist_id}","starred_url":"https://api.github.com/users/flugger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flugger/subscriptions","organizations_url":"https://api.github.com/users/flugger/orgs","repos_url":"https://api.github.com/users/flugger/repos","events_url":"https://api.github.com/users/flugger/events{/privacy}","received_events_url":"https://api.github.com/users/flugger/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"flugger"}}