Overview

The Channel module provides functionality to manage communication channels, check their health status, verify phone numbers, and send messages. This module is essential for ensuring reliable communication with your users.

Available Methods

Health Check

Use the health() method to verify if the communication channel is operational and functioning correctly.

use CrunchzApp\CrunchzApp;

CrunchzApp::channel()
  ->health();

It’s recommended to perform health checks regularly to ensure your communication channels are working properly.

Phone Number Verification

The checkPhoneNumber() method allows you to validate if a phone number exists and is properly formatted.

use CrunchzApp\CrunchzApp;

CrunchzApp::channel()
  ->checkPhoneNumber('628xxxxx');

This performs a standard verification of the provided phone number.

Parallel Processing

For more complex operations, you can use parallel processing to check phone numbers while performing other actions simultaneously.

use CrunchzApp\CrunchzApp;

CrunchzApp::channel()
  ->checkPhoneNumber('628xxxxx', true)
  ->startTyping()
  ->text('Hi there')
  ->stopTyping()
  ->send();

When using parallel mode, make sure to call the send() method at the end to execute all queued operations.

Common Use Cases