{{-- @foreach( $item->relationships('HasManyDeep') as $relation => $relation_data ) @dump($relation) @php $keys = $relation_data['data']->getForeignKeys(); @endphp @dump(end($keys)) @endforeach --}} @foreach( $item->relationships('BelongsToThrough') as $relation => $relation_data ) @php $data = ( new ($relation_data['controller']))->__view_show($item->{$relation})['data']; $data['is_show_extra'] = false; @endphp @can('show '.Str::singular($relation)) @if($item->$relation)