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

gliba20174
gliba20174

I have problem accessing pivot data in twig. I'm passing data to print pdf $ticket = Ticket::with('attendees_pivot')->find($id);

When i try to access in twig with {{ ticke.attendees_pivot }} i get: [{"id":1,"user_id":1,"pivot":{"ticket_id":1,"attendee_id":1,"code":"QfWnI","quantity":"5","is_refunded":0,"is_canceled ....

This is ok, but how can i access "code"?

Tried with {{ ticke.attendees_pivot.code }} but wont work

gliba20174

1-2 of 2

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