<?php

namespace App\Http\Resources\Whatsapp;

use Illuminate\Http\Resources\Json\JsonResource;

class WhatsappParentContactResource extends JsonResource
{
    public function toArray($request): array
    {
        return [
            'firstname' => (string) ($this['firstname'] ?? ''),
            'lastname' => (string) ($this['lastname'] ?? ''),
            'email' => (string) ($this['email'] ?? ''),
            'phone' => (string) ($this['phone'] ?? ''),
            'type' => (string) ($this['type'] ?? ''),
        ];
    }
}
