@if(isset($options->model) && isset($options->type)) @if(class_exists($options->model)) @php $relationshipField = $row->field; @endphp @if($options->type == 'belongsTo') @if(isset($view) && ($view == 'browse' || $view == 'read')) @php $relationshipData = (isset($data)) ? $data : $dataTypeContent; $model = app($options->model); $query = $model::where($options->key,$relationshipData->{$options->column})->first(); @endphp @if(isset($query))
{{ $query->{$options->label} }}
@else{{ __('voyager::generic.no_results') }}
@endif @else @endif @endif @endif @endif