{"action":"opened","issue":{"url":"https://api.github.com/repos/thephpleague/fractal/issues/251","labels_url":"https://api.github.com/repos/thephpleague/fractal/issues/251/labels{/name}","comments_url":"https://api.github.com/repos/thephpleague/fractal/issues/251/comments","events_url":"https://api.github.com/repos/thephpleague/fractal/issues/251/events","html_url":"https://github.com/thephpleague/fractal/issues/251","id":119803614,"number":251,"title":"Can I remove the `data` key on included relationships?","user":{"login":"ryanmortier","id":2053960,"avatar_url":"https://avatars.githubusercontent.com/u/2053960?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanmortier","html_url":"https://github.com/ryanmortier","followers_url":"https://api.github.com/users/ryanmortier/followers","following_url":"https://api.github.com/users/ryanmortier/following{/other_user}","gists_url":"https://api.github.com/users/ryanmortier/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanmortier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanmortier/subscriptions","organizations_url":"https://api.github.com/users/ryanmortier/orgs","repos_url":"https://api.github.com/users/ryanmortier/repos","events_url":"https://api.github.com/users/ryanmortier/events{/privacy}","received_events_url":"https://api.github.com/users/ryanmortier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-01T20:43:43Z","updated_at":"2015-12-01T20:43:43Z","closed_at":null,"body":"For example, here is my transformer:\r\n\r\n```php\r\n<?php\r\n\r\nnamespace App\\Transformers;\r\n\r\nuse App\\Models\\AccountFile;\r\nuse App\\Models\\AccountFolder;\r\nuse League\\Fractal\\TransformerAbstract;\r\n\r\nclass AccountFolderTransformer extends TransformerAbstract\r\n{\r\n    protected $defaultIncludes = ['files'];\r\n\r\n    public function transform(AccountFolder $folder)\r\n    {\r\n        return [\r\n            'id'    => e($folder->id),\r\n            'name'  => e($folder->name)\r\n        ];\r\n    }\r\n\r\n    public function includeFiles(AccountFolder $folder)\r\n    {\r\n        return $this->collection($folder->files, new AccountFileTransformer());\r\n    }\r\n}\r\n\r\nclass AccountFileTransformer extends TransformerAbstract\r\n{\r\n    public function transform(AccountFile $file)\r\n    {\r\n        return [\r\n            'id'         => e($file->id),\r\n            'created_at' => e($file->created_at->diffForHumans()),\r\n            'name'       => e($file->name),\r\n            'user'       => e($file->user->name)\r\n        ];\r\n    }\r\n}\r\n```\r\n\r\nand here is my current output:\r\n\r\n```json\r\n{\r\n    data: [\r\n        {\r\n            id: \"1\",\r\n            name: \"Folder 1\",\r\n            files: {\r\n                data: [ ]\r\n            }\r\n        },\r\n        {\r\n            id: \"2\",\r\n            name: \"Folder 2\",\r\n            files: {\r\n                data: [\r\n                    {\r\n                        id: \"3\",\r\n                        created_at: \"5 hours ago\",\r\n                        name: \"File 1.pdf\",\r\n                        user: \"Ryan Mortier\"\r\n                    },\r\n                    {\r\n                        id: \"1\",\r\n                        created_at: \"5 hours ago\",\r\n                        name: \"File 3.txt\",\r\n                        user: \"Ryan Mortier\"\r\n                    }\r\n                ]\r\n            }\r\n        }\r\n    ]\r\n}\r\n```\r\n\r\nAs you can see, the nested files has the `data` key when really it should just be an array of files without the `data` key, right? I understand I can remove the `data` key on an `Item`, but not a `Collection`?"}}