{"action":"created","comment":{"url":"https://api.github.com/repos/arrilot/laravel-api-generator/pulls/comments/36306035","id":36306035,"diff_hunk":"@@ -274,7 +299,7 @@ protected function setStatusCode($statusCode)\n      */\n     protected function respondWithItem($item)\n     {\n-        $resource = new Item($item, $this->transformer);\n+        $resource = new Item($item, $this->transformer, $this->resourceKey);","path":"src/Skeleton/BaseController.php","position":69,"original_position":69,"commit_id":"b523c266989bd94441cd59dbdd3cd7fd9c49ad20","original_commit_id":"b523c266989bd94441cd59dbdd3cd7fd9c49ad20","user":{"login":"arrilot","id":2826480,"avatar_url":"https://avatars.githubusercontent.com/u/2826480?v=3","gravatar_id":"","url":"https://api.github.com/users/arrilot","html_url":"https://github.com/arrilot","followers_url":"https://api.github.com/users/arrilot/followers","following_url":"https://api.github.com/users/arrilot/following{/other_user}","gists_url":"https://api.github.com/users/arrilot/gists{/gist_id}","starred_url":"https://api.github.com/users/arrilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arrilot/subscriptions","organizations_url":"https://api.github.com/users/arrilot/orgs","repos_url":"https://api.github.com/users/arrilot/repos","events_url":"https://api.github.com/users/arrilot/events{/privacy}","received_events_url":"https://api.github.com/users/arrilot/received_events","type":"User","site_admin":false},"body":"I've also would have gone another way - `$resourceKey='car'` and use `str_plural`","created_at":"2015-08-05T14:17:27Z","updated_at":"2015-08-05T14:17:27Z","html_url":"https://github.com/arrilot/laravel-api-generator/pull/1#discussion_r36306035","pull_request_url":"https://api.github.com/repos/arrilot/laravel-api-generator/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/arrilot/laravel-api-generator/pulls/comments/36306035"},"html":{"href":"https://github.com/arrilot/laravel-api-generator/pull/1#discussion_r36306035"},"pull_request":{"href":"https://api.github.com/repos/arrilot/laravel-api-generator/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/arrilot/laravel-api-generator/pulls/1","id":41510812,"html_url":"https://github.com/arrilot/laravel-api-generator/pull/1","diff_url":"https://github.com/arrilot/laravel-api-generator/pull/1.diff","patch_url":"https://github.com/arrilot/laravel-api-generator/pull/1.patch","issue_url":"https://api.github.com/repos/arrilot/laravel-api-generator/issues/1","number":1,"state":"open","locked":false,"title":"respect resource key + default serializer","user":{"login":"yaapis","id":390195,"avatar_url":"https://avatars.githubusercontent.com/u/390195?v=3","gravatar_id":"","url":"https://api.github.com/users/yaapis","html_url":"https://github.com/yaapis","followers_url":"https://api.github.com/users/yaapis/followers","following_url":"https://api.github.com/users/yaapis/following{/other_user}","gists_url":"https://api.github.com/users/yaapis/gists{/gist_id}","starred_url":"https://api.github.com/users/yaapis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaapis/subscriptions","organizations_url":"https://api.github.com/users/yaapis/orgs","repos_url":"https://api.github.com/users/yaapis/repos","events_url":"https://api.github.com/users/yaapis/events{/privacy}","received_events_url":"https://api.github.com/users/yaapis/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-03T21:16:45Z","updated_at":"2015-08-05T14:17:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"56f1bc31f7dfa16109fc77bcab145df9ebfb605f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/arrilot/laravel-api-generator/pulls/1/commits","review_comments_url":"https://api.github.com/repos/arrilot/laravel-api-generator/pulls/1/comments","review_comment_url":"https://api.github.com/repos/arrilot/laravel-api-generator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/arrilot/laravel-api-generator/issues/1/comments","statuses_url":"https://api.github.com/repos/arrilot/laravel-api-generator/statuses/b523c266989bd94441cd59dbdd3cd7fd9c49ad20","head":{"label":"NewwayLibs:master","ref":"master","sha":"b523c266989bd94441cd59dbdd3cd7fd9c49ad20","user":{"login":"NewwayLibs","id":9549975,"avatar_url":"https://avatars.githubusercontent.com/u/9549975?v=3","gravatar_id":"","url":"https://api.github.com/users/NewwayLibs","html_url":"https://github.com/NewwayLibs","followers_url":"https://api.github.com/users/NewwayLibs/followers","following_url":"https://api.github.com/users/NewwayLibs/following{/other_user}","gists_url":"https://api.github.com/users/NewwayLibs/gists{/gist_id}","starred_url":"https://api.github.com/users/NewwayLibs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NewwayLibs/subscriptions","organizations_url":"https://api.github.com/users/NewwayLibs/orgs","repos_url":"https://api.github.com/users/NewwayLibs/repos","events_url":"https://api.github.com/users/NewwayLibs/events{/privacy}","received_events_url":"https://api.github.com/users/NewwayLibs/received_events","type":"Organization","site_admin":false},"repo":{"id":40146808,"name":"laravel-api-generator","full_name":"NewwayLibs/laravel-api-generator","owner":{"login":"NewwayLibs","id":9549975,"avatar_url":"https://avatars.githubusercontent.com/u/9549975?v=3","gravatar_id":"","url":"https://api.github.com/users/NewwayLibs","html_url":"https://github.com/NewwayLibs","followers_url":"https://api.github.com/users/NewwayLibs/followers","following_url":"https://api.github.com/users/NewwayLibs/following{/other_user}","gists_url":"https://api.github.com/users/NewwayLibs/gists{/gist_id}","starred_url":"https://api.github.com/users/NewwayLibs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NewwayLibs/subscriptions","organizations_url":"https://api.github.com/users/NewwayLibs/orgs","repos_url":"https://api.github.com/users/NewwayLibs/repos","events_url":"https://api.github.com/users/NewwayLibs/events{/privacy}","received_events_url":"https://api.github.com/users/NewwayLibs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NewwayLibs/laravel-api-generator","description":"Two simple tools for building REST APIs with Fractal: console generator and API skeleton","fork":true,"url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator","forks_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/forks","keys_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/teams","hooks_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/hooks","issue_events_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/issues/events{/number}","events_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/events","assignees_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/assignees{/user}","branches_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/branches{/branch}","tags_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/tags","blobs_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/git/refs{/sha}","trees_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/statuses/{sha}","languages_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/languages","stargazers_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/stargazers","contributors_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/contributors","subscribers_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/subscribers","subscription_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/subscription","commits_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/commits{/sha}","git_commits_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/git/commits{/sha}","comments_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/comments{/number}","issue_comment_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/issues/comments{/number}","contents_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/contents/{+path}","compare_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/merges","archive_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/downloads","issues_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/issues{/number}","pulls_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/pulls{/number}","milestones_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/milestones{/number}","notifications_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/labels{/name}","releases_url":"https://api.github.com/repos/NewwayLibs/laravel-api-generator/releases{/id}","created_at":"2015-08-03T20:38:41Z","updated_at":"2015-08-03T20:38:41Z","pushed_at":"2015-08-04T09:17:52Z","git_url":"git://github.com/NewwayLibs/laravel-api-generator.git","ssh_url":"git@github.com:NewwayLibs/laravel-api-generator.git","clone_url":"https://github.com/NewwayLibs/laravel-api-generator.git","svn_url":"https://github.com/NewwayLibs/laravel-api-generator","homepage":"","size":109,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"arrilot:master","ref":"master","sha":"3fe1b6a246b312012d8f85c3f32c15f6dbcf6c26","user":{"login":"arrilot","id":2826480,"avatar_url":"https://avatars.githubusercontent.com/u/2826480?v=3","gravatar_id":"","url":"https://api.github.com/users/arrilot","html_url":"https://github.com/arrilot","followers_url":"https://api.github.com/users/arrilot/followers","following_url":"https://api.github.com/users/arrilot/following{/other_user}","gists_url":"https://api.github.com/users/arrilot/gists{/gist_id}","starred_url":"https://api.github.com/users/arrilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arrilot/subscriptions","organizations_url":"https://api.github.com/users/arrilot/orgs","repos_url":"https://api.github.com/users/arrilot/repos","events_url":"https://api.github.com/users/arrilot/events{/privacy}","received_events_url":"https://api.github.com/users/arrilot/received_events","type":"User","site_admin":false},"repo":{"id":35904354,"name":"laravel-api-generator","full_name":"arrilot/laravel-api-generator","owner":{"login":"arrilot","id":2826480,"avatar_url":"https://avatars.githubusercontent.com/u/2826480?v=3","gravatar_id":"","url":"https://api.github.com/users/arrilot","html_url":"https://github.com/arrilot","followers_url":"https://api.github.com/users/arrilot/followers","following_url":"https://api.github.com/users/arrilot/following{/other_user}","gists_url":"https://api.github.com/users/arrilot/gists{/gist_id}","starred_url":"https://api.github.com/users/arrilot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arrilot/subscriptions","organizations_url":"https://api.github.com/users/arrilot/orgs","repos_url":"https://api.github.com/users/arrilot/repos","events_url":"https://api.github.com/users/arrilot/events{/privacy}","received_events_url":"https://api.github.com/users/arrilot/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arrilot/laravel-api-generator","description":"Two simple tools for building REST APIs with Fractal: console generator and API skeleton","fork":false,"url":"https://api.github.com/repos/arrilot/laravel-api-generator","forks_url":"https://api.github.com/repos/arrilot/laravel-api-generator/forks","keys_url":"https://api.github.com/repos/arrilot/laravel-api-generator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arrilot/laravel-api-generator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arrilot/laravel-api-generator/teams","hooks_url":"https://api.github.com/repos/arrilot/laravel-api-generator/hooks","issue_events_url":"https://api.github.com/repos/arrilot/laravel-api-generator/issues/events{/number}","events_url":"https://api.github.com/repos/arrilot/laravel-api-generator/events","assignees_url":"https://api.github.com/repos/arrilot/laravel-api-generator/assignees{/user}","branches_url":"https://api.github.com/repos/arrilot/laravel-api-generator/branches{/branch}","tags_url":"https://api.github.com/repos/arrilot/laravel-api-generator/tags","blobs_url":"https://api.github.com/repos/arrilot/laravel-api-generator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arrilot/laravel-api-generator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arrilot/laravel-api-generator/git/refs{/sha}","trees_url":"https://api.github.com/repos/arrilot/laravel-api-generator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arrilot/laravel-api-generator/statuses/{sha}","languages_url":"https://api.github.com/repos/arrilot/laravel-api-generator/languages","stargazers_url":"https://api.github.com/repos/arrilot/laravel-api-generator/stargazers","contributors_url":"https://api.github.com/repos/arrilot/laravel-api-generator/contributors","subscribers_url":"https://api.github.com/repos/arrilot/laravel-api-generator/subscribers","subscription_url":"https://api.github.com/repos/arrilot/laravel-api-generator/subscription","commits_url":"https://api.github.com/repos/arrilot/laravel-api-generator/commits{/sha}","git_commits_url":"https://api.github.com/repos/arrilot/laravel-api-generator/git/commits{/sha}","comments_url":"https://api.github.com/repos/arrilot/laravel-api-generator/comments{/number}","issue_comment_url":"https://api.github.com/repos/arrilot/laravel-api-generator/issues/comments{/number}","contents_url":"https://api.github.com/repos/arrilot/laravel-api-generator/contents/{+path}","compare_url":"https://api.github.com/repos/arrilot/laravel-api-generator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arrilot/laravel-api-generator/merges","archive_url":"https://api.github.com/repos/arrilot/laravel-api-generator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arrilot/laravel-api-generator/downloads","issues_url":"https://api.github.com/repos/arrilot/laravel-api-generator/issues{/number}","pulls_url":"https://api.github.com/repos/arrilot/laravel-api-generator/pulls{/number}","milestones_url":"https://api.github.com/repos/arrilot/laravel-api-generator/milestones{/number}","notifications_url":"https://api.github.com/repos/arrilot/laravel-api-generator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arrilot/laravel-api-generator/labels{/name}","releases_url":"https://api.github.com/repos/arrilot/laravel-api-generator/releases{/id}","created_at":"2015-05-19T19:40:46Z","updated_at":"2015-07-27T03:39:10Z","pushed_at":"2015-08-04T09:17:53Z","git_url":"git://github.com/arrilot/laravel-api-generator.git","ssh_url":"git@github.com:arrilot/laravel-api-generator.git","clone_url":"https://github.com/arrilot/laravel-api-generator.git","svn_url":"https://github.com/arrilot/laravel-api-generator","homepage":"","size":208,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/arrilot/laravel-api-generator/pulls/1"},"html":{"href":"https://github.com/arrilot/laravel-api-generator/pull/1"},"issue":{"href":"https://api.github.com/repos/arrilot/laravel-api-generator/issues/1"},"comments":{"href":"https://api.github.com/repos/arrilot/laravel-api-generator/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/arrilot/laravel-api-generator/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/arrilot/laravel-api-generator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/arrilot/laravel-api-generator/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/arrilot/laravel-api-generator/statuses/b523c266989bd94441cd59dbdd3cd7fd9c49ad20"}}}}