@php $relation = Str::before($column_name, '_id'); $field = 'id'; @endphp @if (isset($item->$relation) == null) - @elseif (isset($item->$relation->fullName)) {{ $item->$relation->fullName }} @else MPL kód: {{ $item->$relation->mpl_code ?? '-' }} @if($item->$relation->mpl_code)
Csomag címirat: @endif @endif {{-- @php $relation = Str::before($column_name, '_id'); $field = 'id'; @endphp { render: function ( data, type, row, meta ) { if(!row.{{$relation}}) return null; url = '{{ route('admin.orders.show', ':slug') }}'.replace(':slug', row.{{$relation}}.{{$field}}); return 'Nyugta: '+ ( row.{{$relation}}.invoice_number ?? '-' ) +''; }, data: '{{$relation}}[,{{$field}}]', name: '{{$relation}}.{{$field}}', className: 'align-middle' }, --}}