public function getRecipients()
    {

        if (empty($this->recipients)) {
            return [];
        }
        $recipients = ($this->recipients instanceof Collection) ? $this->recipients->toArray() : $this->recipients;


        if (!is_array($recipients)) {
            return $recipients;
        }
        $return = [];

        foreach ($recipients as $recipient) {
            if ($recipient instanceof \Illuminate\Database\Eloquent\Model) {
                if ($this->type == 'email' and ! isset($recipient->email)) {
                    continue;
                }
                if ($this->type == 'email') {
                    array_push($return, $recipient->email);
                }
                if ($this->type == 'sms' and ! isset($recipient->phone)) {
                    continue;
                }
                if ($this->type == 'sms') {
                    array_push($return, $recipient->phone);
                }
            }
        }
        return array_filter(array_unique($return));
    }