label('Sync from Intune') ->icon('heroicon-o-arrow-path') ->color('primary') ->requiresConfirmation() ->action(function () { try { $tenant = Tenant::current(); /** @var PolicySyncService $service */ $service = app(PolicySyncService::class); $synced = $service->syncPolicies($tenant); Notification::make() ->title('Policy sync completed') ->body(count($synced).' policies synced') ->success() ->send(); } catch (\Throwable $e) { Notification::make() ->title('Policy sync failed') ->body($e->getMessage()) ->danger() ->send(); } }), ]; } }