} */ public function getSystemStatus(): array { $reasons = []; $isEnabled = true; if (!Setting::isArticleProcessingEnabled()) { $isEnabled = false; $reasons[] = 'Manually disabled by user'; } if (!Feed::where('is_active', true)->exists()) { $isEnabled = false; $reasons[] = 'No active feeds configured'; } if (!PlatformChannel::where('is_active', true)->exists()) { $isEnabled = false; $reasons[] = 'No active platform channels configured'; } if (!Route::where('is_active', true)->exists()) { $isEnabled = false; $reasons[] = 'No active feed-to-channel routes configured'; } return [ 'is_enabled' => $isEnabled, 'status' => $isEnabled ? 'Enabled' : 'Disabled', 'status_class' => $isEnabled ? 'text-green-600' : 'text-red-600', 'reasons' => $reasons, ]; } public function canProcessArticles(): bool { return $this->getSystemStatus()['is_enabled']; } }