label('Run Prediction Now') ->icon('heroicon-o-cpu-chip') ->requiresConfirmation() ->modalHeading('Run oil price prediction?') ->modalDescription('Generates a new prediction from the stored Brent prices. Runs even if a prediction already exists for the latest price.') ->action(function () { $result = Artisan::call('oil:predict', ['--force' => true]); if ($result === 0) { Notification::make() ->title('Prediction generated successfully') ->success() ->send(); } else { Notification::make() ->title('Prediction failed') ->body('Check API Logs for details.') ->danger() ->send(); } }), ]; } }