@foreach(Head::with('subHead','subHead.childHead')->where(['master_head' => $key , 'type' => 1 ])->get() as $head)
{{ Str::limit($head->name,15) }}
@endforeach
@foreach($head->subHead as $subHead)
{{ Str::limit($subHead->name,15) }}
@endforeach
@foreach($subHead->childHead as $childHead)
{{ Str::limit($childHead->name,15) }}
@endforeach