| {{ $headerTitle }} @if(str_starts_with($headerName, $sortBy)) @if($orderBy === 'asc') @else @endif @endif @if(isset(request()->filters[$headerName]) || isset(request()->filters[str_replace('_txt', '', $headerName) . '_from']) || isset(request()->filters[str_replace('_txt', '', $headerName) . '_to']) ) @endif | @endforeach
|---|
@if(str_contains($headerName, '-'))
@php
list($rel, $field) = explode('-', $headerName);
// var_dump($string->$rel);die();
@endphp
@if(isset($string->$rel->$field))
@if(str_ends_with($field, '_id'))
@php
$relation = \Illuminate\Support\Str::camel(str_replace('_id', '', $field));
@endphp
{!! $string->$rel->$relation?->name; !!}
@else
{!! $string->$rel->$field !!}
@endif
@else
|
@endforeach