{{-- ? To set: * required: model as string * models as string * thead as array [ tr => [ th => [ name as string name of column sortable_id as string default false width as integer between 1 and 10 scope as string default col ] ] ] option: class_vh as integer between 10 and 100 ? Filenames: Table Data File = _table_data_ $table_name ? To implement in Blade: * @includeIf('layouts.components.table_infinity_scroll', [ 'model' => $model, 'models' => $models, 'thead' => [ [ 0 => [ 'name' => '', 'sortable_id' => '', 'width' => '' ] ] ] ]) --}}
@includeIf('_filter')
@php $table_name = $model->getTable(); $th_max_width = 97; $th_sum_width = ['sum_width' => 0, 'count_width' => 0]; @endphp @includeIf('flash_message', ['alert_type' => $model->getTable()]) @foreach ($thead as $tr) @php foreach ($tr as $th) { $th_sum_width['sum_width'] = $th_sum_width['sum_width'] + (int)$th['width']; $th_sum_width['count_width'] = !empty($th['width']) ? $th_sum_width['count_width'] + 1 : $th_sum_width['count_width']; } @endphp @foreach ($tr as $th) @endforeach @endforeach @includeIf('layouts.components.ajax_loader')
@includeif($table_name .'.' .'_table_data_' .$table_name ) @includeif($table_name .'._' .$table_name .'_table_data')
# @if (!empty($th['sortable_id'])) @sortablelink($th['sortable_id'], $th['name']) @else {{ $th['name'] }} @endif
{{ $models->total() === 1 ? $models->total() .' Eintrag' : ( $models->total() === 0 ? 'keine Einträge gefunden' : $models->total() .' Einträge' ) }}