argument('filename'); $format = $this->argument('format'); $urls = include Storage::disk('local')->path($filename); foreach ($urls as $url) { $service = new Service($url, $this->output); if ($service->modelExists($url)) { $this->info("Skipping $url. Exists in db!"); continue; } if ($service->createModel($format)) { $this->info("Download {$service->getTitle()} from $url!"); } else { $this->info('Skipping ' . $url . '. ' . ucfirst($format) . ' file already exists!'); continue; } $this->info("Download {$service->getTitle()} from $url!"); } return Command::SUCCESS; } }