All the offices has a parent? I can imagine that the parent is field can be null
So what you need to do is use the or inside the view, like this
{{ $office_type->office_type->name or ""}}
I suggest to follow the laravel standards in terms of method naming methods should be on camel case
Thank you for the response. An office may or may not have a parent. I will try out your suggestion and revert.
Thanks
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community