This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

phplee
phplee

Hi, Wondering if you could help. I have a confirmation email which is sent out when a user registers for an event. Now the user can register additional guest which are stored as repeaters so are stored in a field 'registrants' as json.

However I'm not sure how to look through the additional guessed json field in the mail template. I'm guessing is down to it being converted toArray().

 Mail::send('timmarner.events::mail.notification', $registration->toArray(), function($message) use ($registration) {
        $message->to("joeblogss@admin.com", "Your Website");

Is there away to do this?

thanks

phplee
phplee

Just to let everyone know ->toArray() doesn't convert any json fields to an array so had to reassign it.

 $registration                 = $this->toArray();
    $registration['event']        = $this->event->title;
    $registration['registrants']  = $this->registrants;

1-2 of 2

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.