'required|string', 'phone_number_id' => 'required|string', 'whatsapp_api_url' => 'required|url', 'webhook_verify_token' => 'required|string', 'app_secret' => 'required|string', ]; public function mount(): void { $keys = [ 'whatsapp_token', 'phone_number_id', 'whatsapp_api_url', 'webhook_verify_token', 'app_secret', 'bot_enabled', ]; foreach ($keys as $key) { $this->{$key} = WhatsappSystemConfig::get($key); } } public function save(): void { $this->validate(); $keys = [ 'whatsapp_token', 'phone_number_id', 'whatsapp_api_url', 'webhook_verify_token', 'app_secret', 'bot_enabled', ]; foreach ($keys as $key) { WhatsappSystemConfig::set($key, $this->{$key}); } $this->alert('success', 'Configuración guardada correctamente.'); } public function render() { return view('livewire.whatsapp.show-configuracion-bot'); } }