protected function importImages() { // we should have things in DB now, and we can look at that data. $listingCount = RetsProperty::count(); $this->line('We have ' . $listingCount . ' items in property table'); $loadImages = $this->ask('Are you ready to load all images? (y/n)', 'y'); if (strtolower($loadImages) == 'n') { $this->line('You can load images any time later.'); exit; } if ($listingCount > 0) { for ($i = 4100; $i < $listingCount; $i += 100) { $this->info('Current offset: ' . $i); $listings = RetsProperty::take(100)->skip($i)->get(['techid']); foreach ($listings as $listing) { $this->call('rets:image', ['--id' => $listing->techid]); } } } }