{"action":"created","issue":{"url":"https://api.github.com/repos/themsaid/laravel-model-transformer/issues/3","repository_url":"https://api.github.com/repos/themsaid/laravel-model-transformer","labels_url":"https://api.github.com/repos/themsaid/laravel-model-transformer/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/themsaid/laravel-model-transformer/issues/3/comments","events_url":"https://api.github.com/repos/themsaid/laravel-model-transformer/issues/3/events","html_url":"https://github.com/themsaid/laravel-model-transformer/issues/3","id":166271047,"number":3,"title":"How can paginated models be transformed?","user":{"login":"VasileGabriel","id":10602896,"avatar_url":"https://avatars.githubusercontent.com/u/10602896?v=3","gravatar_id":"","url":"https://api.github.com/users/VasileGabriel","html_url":"https://github.com/VasileGabriel","followers_url":"https://api.github.com/users/VasileGabriel/followers","following_url":"https://api.github.com/users/VasileGabriel/following{/other_user}","gists_url":"https://api.github.com/users/VasileGabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/VasileGabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VasileGabriel/subscriptions","organizations_url":"https://api.github.com/users/VasileGabriel/orgs","repos_url":"https://api.github.com/users/VasileGabriel/repos","events_url":"https://api.github.com/users/VasileGabriel/events{/privacy}","received_events_url":"https://api.github.com/users/VasileGabriel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-07-19T08:04:59Z","updated_at":"2016-11-27T12:22:25Z","closed_at":null,"body":"Hey, nice package, but the transformer works only with a model or collection. What about paginated results?\n\nThanks.\n"},"comment":{"url":"https://api.github.com/repos/themsaid/laravel-model-transformer/issues/comments/263119346","html_url":"https://github.com/themsaid/laravel-model-transformer/issues/3#issuecomment-263119346","issue_url":"https://api.github.com/repos/themsaid/laravel-model-transformer/issues/3","id":263119346,"user":{"login":"marktimbol","id":5227158,"avatar_url":"https://avatars.githubusercontent.com/u/5227158?v=3","gravatar_id":"","url":"https://api.github.com/users/marktimbol","html_url":"https://github.com/marktimbol","followers_url":"https://api.github.com/users/marktimbol/followers","following_url":"https://api.github.com/users/marktimbol/following{/other_user}","gists_url":"https://api.github.com/users/marktimbol/gists{/gist_id}","starred_url":"https://api.github.com/users/marktimbol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marktimbol/subscriptions","organizations_url":"https://api.github.com/users/marktimbol/orgs","repos_url":"https://api.github.com/users/marktimbol/repos","events_url":"https://api.github.com/users/marktimbol/events{/privacy}","received_events_url":"https://api.github.com/users/marktimbol/received_events","type":"User","site_admin":false},"created_at":"2016-11-27T12:22:25Z","updated_at":"2016-11-27T12:22:25Z","body":"Hi Themsaid, very nice package!\r\n\r\nI'm trying to transform the paginated posts but with no luck. I also tried this code that you suggested and I'm getting an error \r\nType error: Argument 1 passed to App\\Transformers\\PostTransformer::transformModel() must be an instance of Illuminate\\Database\\Eloquent\\Model, instance of Illuminate\\Support\\Collection given, called in /home/vagrant/code/demo/vendor/themsaid/laravel-model-transformers/src/AbstractTransformer.php on line 38\r\n\r\n```php\r\nItemTransformer::transform(collect($items->paginate(10)->items()));\r\n```\r\n\r\nThanks"}}
{"actor":{"display_login":"marktimbol"}}