Support the ongoing development of Laravel.io →
posted 7 years ago
Blade

https://ibb.co/gDwB1R How can I get the value 'name' under 'rekenplichtige' in my Blade template? If I do this: {{ $vestiging->rekenplichtige->name }} I get the following error: ErrorException Trying to get property of non-object

That syntax is working to get the 'naam' under 'gemeente'. I have no idea about what's going wrong.

Last updated 3 years ago.
0

Please try {{ @$vestiging->rekenplichtige->user->name }}

0

What is the value of $vestiging->rekenplichtige?

the sintax is fine (IMO), just for test $vestiging->rekenplichtige should return the object

0

Sign in to participate in this thread!

Eventy

Your banner here too?

ufeg02 ufeg02 Joined 25 Jul 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.