where('is_active', true) ->get(['country_code', 'action']) ->map(static function ($rule): array { return [ 'country_code' => strtoupper((string) $rule->country_code), 'action' => $rule->action, 'is_active' => true, ]; }) ->values() ->toArray(); $agent = new AgentClient; $agent->geoApplyRules($rules); } }