{"action":"created","issue":{"url":"https://api.github.com/repos/dingo/api/issues/506","labels_url":"https://api.github.com/repos/dingo/api/issues/506/labels{/name}","comments_url":"https://api.github.com/repos/dingo/api/issues/506/comments","events_url":"https://api.github.com/repos/dingo/api/issues/506/events","html_url":"https://github.com/dingo/api/issues/506","id":93087752,"number":506,"title":"Factory::setTransformer() is undefind","user":{"login":"vanntian","id":10600430,"avatar_url":"https://avatars.githubusercontent.com/u/10600430?v=3","gravatar_id":"","url":"https://api.github.com/users/vanntian","html_url":"https://github.com/vanntian","followers_url":"https://api.github.com/users/vanntian/followers","following_url":"https://api.github.com/users/vanntian/following{/other_user}","gists_url":"https://api.github.com/users/vanntian/gists{/gist_id}","starred_url":"https://api.github.com/users/vanntian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanntian/subscriptions","organizations_url":"https://api.github.com/users/vanntian/orgs","repos_url":"https://api.github.com/users/vanntian/repos","events_url":"https://api.github.com/users/vanntian/events{/privacy}","received_events_url":"https://api.github.com/users/vanntian/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-05T07:39:35Z","updated_at":"2015-07-05T08:45:12Z","closed_at":null,"body":"$app['Dingo\\Api\\Transformer\\Factory']->setTransformer(function ($app) {\r\n    return new Dingo\\Api\\Transformer\\Adapter\\Fractal(new League\\Fractal\\Manager, 'include', ',');\r\n});"},"comment":{"url":"https://api.github.com/repos/dingo/api/issues/comments/118595737","html_url":"https://github.com/dingo/api/issues/506#issuecomment-118595737","issue_url":"https://api.github.com/repos/dingo/api/issues/506","id":118595737,"user":{"login":"vanntian","id":10600430,"avatar_url":"https://avatars.githubusercontent.com/u/10600430?v=3","gravatar_id":"","url":"https://api.github.com/users/vanntian","html_url":"https://github.com/vanntian","followers_url":"https://api.github.com/users/vanntian/followers","following_url":"https://api.github.com/users/vanntian/following{/other_user}","gists_url":"https://api.github.com/users/vanntian/gists{/gist_id}","starred_url":"https://api.github.com/users/vanntian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanntian/subscriptions","organizations_url":"https://api.github.com/users/vanntian/orgs","repos_url":"https://api.github.com/users/vanntian/repos","events_url":"https://api.github.com/users/vanntian/events{/privacy}","received_events_url":"https://api.github.com/users/vanntian/received_events","type":"User","site_admin":false},"created_at":"2015-07-05T08:45:12Z","updated_at":"2015-07-05T08:45:12Z","body":"@jasonlewis and transform is not work\r\n\r\npublic function index()\r\n    {\r\n        $categories = Category::all();\r\n\r\n        return $this->collection($categories,new CategoryTransformer);\r\n    }\r\n\r\npublic function transform(Category $category)\r\n    {\r\n        return [\r\n            'id' => $category->id,\r\n            'name' => $category->name,\r\n            'sort' => $category->sort,\r\n            'is-show' => $category->is_show\r\n        ];\r\n    }\r\n![default](https://cloud.githubusercontent.com/assets/10600430/8510979/2ac9edde-2335-11e5-8df5-38a84e565db6.PNG)\r\n\r\n\r\n\r\n"}}