foreach ($tr as $k => $lines) {
foreach ($lines->find('td') as $td) {
- $datas[$k][] = trim(preg_replace('/\s\s+/', ' ', $td->text));
+ $text = $td->text;
+ if($td->getAttribute('data-flag')) {
+ $text = $td->getAttribute('data-flag');
+ } elseif($td->getAttribute('sorttable_customkey')) {
+ $text = $td->getAttribute('sorttable_customkey');
+ }
+
+ $datas[$k][] = trim(preg_replace('/\s\s+/', ' ', $text));
}
}
{{-- Search Keywords --}}
@if($searches->isNotEmpty())
<div>
- <h3 data-title-excel="{{ __('Mots') }}">{{ __('Mots recherchés') }}</h3>
+ <h3 data-title-excel="{{ __('Recherches') }}">{{ __('Mots recherchés') }}</h3>
<table class="{!! $tableClasses !!}">
<thead>
</tr>
</thead>
<tbody>
- @foreach($countries as $country)
+ @foreach($countries as $key => $country)
<tr>
- <td class="whitespace-nowrap" data-sort-value="{{ $country['label'] }}">
+ <td data-flag="{{ $key }}" class="whitespace-nowrap" data-sort-value="{{ $country['label'] }}">
<img src="{{ $country['flag'] }}" alt="{{ $country['label'] }}"
style="width: 1.5em; margin-right: 0.75em;">
{{ $country['label'] }}