@props([ 'module' => 'table', // localStorage ayarları için benzersiz anahtar 'title' => null, 'subtitle' => null, 'icon' => null, 'columns' => [], // [['key','label','sortable','sort','visible','fixed','align','width']] 'filters' => [], // [['key','label','options'=>[val=>label],'value','placeholder']] 'search' => '', 'searchPlaceholder' => 'Ara...', 'sort' => null, 'dir' => 'desc', 'createUrl' => null, 'createLabel' => 'Yeni Ekle', 'bulk' => false, 'stats' => [], // [['label','value','icon','color']] 'paginator' => null, // LengthAwarePaginator → otomatik sayfalama çubuğu (üst + alt) 'perPageOptions' => [10, 25, 50, 100], // sayfa başına kayıt seçenekleri ]) @php $activeFilterCount = collect($filters)->filter(fn ($f) => ($f['value'] ?? '') !== '' && !is_null($f['value'] ?? null))->count(); $defaultHidden = collect($columns) ->filter(fn ($c) => (($c['visible'] ?? true) === false) && !($c['fixed'] ?? false)) ->pluck('key')->values(); @endphp
{{ $subtitle }}
@endif| @endif @foreach($columns as $col) | @if($col['sortable'] ?? false) @php $sortKey = $col['sort'] ?? $col['key']; $isActive = $sort === $sortKey; @endphp @else {{ $col['label'] }} @endif | @endforeach
|---|