option('limit'); $allThemes = $this->option('all-themes'); $keyword = $this->argument('keyword'); if ($allThemes) { $themes = Theme::active()->get(); if ($themes->isEmpty()) { $this->error('No active themes found.'); return; } foreach ($themes as $theme) { $this->info("Crawling for theme: {$theme->name}"); $count = $service->crawlFromGoogleNews($theme->name, $limit, [$theme->id]); $this->info("Saved {$count} news items for theme: {$theme->name}"); } return; } if (! $keyword) { $this->error('Please provide a keyword or use --all-themes'); return; } $this->info("Crawling for keyword: {$keyword}"); $count = $service->crawlFromGoogleNews($keyword, $limit); $this->info("Saved {$count} news items for keyword: {$keyword}"); } }