destination; $masked = strlen($destination) > 6 ? substr($destination, 0, 3).str_repeat('*', max(3, strlen($destination) - 6)).substr($destination, -3) : str_repeat('*', strlen($destination)); return [ ...parent::toArray($request), 'destination' => $masked, 'message' => $this->whenLoaded('message'), 'channel_config' => $this->whenLoaded('channelConfig'), ]; } }