src/Vendors/Smsgatewayme/Contact.php
public function addNumber(int $id, string $number): ?array
    {
        $response = Request::put($this->baseUrl.sprintf('contact/%d/phone-number/%s', $id, $number));

        if ($response->code != 200) {
            if (!empty($response->body->message)) {
                Log::error($response->body->message);
            }
        }

        return [
            'code'    => $response->code,
            'message' => ($response->code == 200) ? 'OK' : $response->body->message ?? '',
            'data'    => $response->body,
        ];
    }
public function addNumber(int $id, string $number): ?array
    {
        $response = Request::put($this->baseUrl.sprintf('contact/%d/phone-number/%s', $id, $number));

        if ($response->code != 200) {
            if (!empty($response->body->message)) {
                Log::error($response->body->message);
            }
        }

        return [
            'code'    => $response->code,
            'message' => ($response->code == 200) ? 'OK' : $response->body->message ?? '',
            'data'    => $response->body,
        ];
    }
public function addNumber ( int $ id , string $ number ) : ? array { $ response = Request :: put ( $ this -> baseUrl . sprintf ( 'contact/%d/phone-number/%s' , $ id , $ number ) ) ; if ( $ response -> code != 200 ) { if ( ! empty ( $ response -> body -> message ) ) { Log :: error ( $ response -> body -> message ) ; } } return [ 'code' => $ response -> code , 'message' => ( $ response -> code == 200 ) ? 'OK' : $ response -> body -> message ?? '' , 'data' => $ response -> body , ] ; }
Add number to existing contact.

@param int    $id
@param string $number

@return array|null
Add number to existing contact .