In laravel blade I get an object, and write out {{ $ticket }}
{"id":1,
"program_id":1,
"title":"Di\u00e1k",
"price":200,
"created_at":"2019-02-27 15:20:07",
"updated_at":"2019-02-27 15:20:07",
"bought_tickets": {
"id":3,
"ticket_id":1,
"event_id":6,
"number":10,
"created_at":"2019-02-28 13:41:51",
"updated_at":"2019-02-28 13:41:51",
"deleted_at":null}}
But if i want to write out the bought_tickets {{ $ticket->bought_tickets }} got nothing. It was as if it was not defined.
What do I do wrong?
Problem was the model. I do a query: Program::with('tickets', 'fields', 'tickets.boughtTickets')->get();
The relationship call method is boughtTickets not bought_tickets.