{"action":"opened","issue":{"url":"https://api.github.com/repos/andrey-helldar/sitemap/issues/33","repository_url":"https://api.github.com/repos/andrey-helldar/sitemap","labels_url":"https://api.github.com/repos/andrey-helldar/sitemap/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/andrey-helldar/sitemap/issues/33/comments","events_url":"https://api.github.com/repos/andrey-helldar/sitemap/issues/33/events","html_url":"https://github.com/andrey-helldar/sitemap/issues/33","id":377055059,"node_id":"MDU6SXNzdWUzNzcwNTUwNTk=","number":33,"title":"Improve the data transfer a `images()` method","user":{"login":"andrey-helldar","id":10347617,"node_id":"MDQ6VXNlcjEwMzQ3NjE3","avatar_url":"https://avatars2.githubusercontent.com/u/10347617?v=4","gravatar_id":"","url":"https://api.github.com/users/andrey-helldar","html_url":"https://github.com/andrey-helldar","followers_url":"https://api.github.com/users/andrey-helldar/followers","following_url":"https://api.github.com/users/andrey-helldar/following{/other_user}","gists_url":"https://api.github.com/users/andrey-helldar/gists{/gist_id}","starred_url":"https://api.github.com/users/andrey-helldar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrey-helldar/subscriptions","organizations_url":"https://api.github.com/users/andrey-helldar/orgs","repos_url":"https://api.github.com/users/andrey-helldar/repos","events_url":"https://api.github.com/users/andrey-helldar/events{/privacy}","received_events_url":"https://api.github.com/users/andrey-helldar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-03T13:35:21Z","updated_at":"2018-11-03T13:35:21Z","closed_at":null,"author_association":"OWNER","body":"Now the method accepts only ready-made data set:\r\n```php\r\n->images($data1, $data2, $data3)\r\n```\r\n\r\nThis is inconvenient because if the table contains, for example, 200'000 records, the validator will return an error, since the maximum number of records is 500.\r\nIt is necessary to check the elements for a type: if it is an array, then iterate over it, and if it is instance of `Helldar\\Sitemap\\Services\\Make\\Images`, then work with it as with an element for output.\r\n\r\nFor example:\r\n```php\r\n$data1 = app('sitemap')->makeImages()->image('http://example.com/images/1.jpg');\r\n$data2 = app('sitemap')->makeImages()->image('http://example.com/images/2.jpg');\r\n$data3 = [\r\n    app('sitemap')->makeImages()->image('http://example.com/images/3jpg'),\r\n    app('sitemap')->makeImages()->image('http://example.com/images/4.jpg'),\r\n    app('sitemap')->makeImages()->image('http://example.com/images/5.jpg'),\r\n];\r\n\r\napp('sitemap')\r\n    ->images($data1, $data2, $data3)\r\n   ->save();\r\n```"}}
{"actor":{"display_login":"andrey-helldar"}}