Contact Data DTO Reference
The NjoguAmos\Waha\Dto\ContactData represents a contact returned from the WAHA API.
php
use NjoguAmos\Waha\Facades\Contact;
use NjoguAmos\Waha\Dto\ContactData;
$response = Contact::all();
$contacts = $response->dtoOrFail(); // ContactData[]id → string|null
The contact's WhatsApp ID (chat ID).
php
$contact->id; // "[email protected]"number → string|null
The contact's phone number.
php
$contact->number; // "11231231231"name → string|null
The contact's display name.
php
$contact->name; // "Contact Name"pushname → string|null
The contact's push name (username set by the contact).
php
$contact->pushname; // "Pushname"shortName → string|null
The contact's short name.
php
$contact->shortName; // "Shortname"isMe → bool|null
Whether this contact is the authenticated user.
php
$contact->isMe; // trueisGroup → bool|null
Whether this contact is a group.
php
$contact->isGroup; // falseisWAContact → bool|null
Whether this contact is a WhatsApp user.
php
$contact->isWAContact; // trueisMyContact → bool|null
Whether this contact is in the authenticated user's contact list.
php
$contact->isMyContact; // trueisBlocked → bool|null
Whether this contact is blocked.
php
$contact->isBlocked; // falseTIP
All fields are nullable. Some fields may not be present in the API response, in which case they will be null.