@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}}.mpl_code ?? '-' ) +''; }, data: '{{$relation}}[,{{$field}}]', name: '{{$relation}}.{{$field}}', className: 'align-middle' },