Date: December 30, 2025
Version: 1.5.2+
Status: ✅ Production Ready
This document outlines all improvements made to the artflow-studio/table package for better sorting support, enhanced UI/UX, and comprehensive documentation.
File: src/Http/Livewire/DatatableTrait.php
sortBy property as public property (alias for sortColumn)sort property for backward compatibilitymount() method to accept $sortBy, $sortDirection, and $sort parameterssortBy property with sortColumn for Livewire reactivitysortBy() method to keep properties in syncBefore:
public $sortColumn = null;
public $sortDirection = 'asc';
public function mount($model, $columns, $filters = [], $actions = [], ...) {
if (empty($this->sortColumn)) {
$this->sortColumn = $this->getOptimalSortColumn();
}
}
After:
public $sortColumn = null;
public $sortBy = null; // NEW - User-facing alias
public $sortDirection = 'asc';
public $sort = null; // NEW - Backward compatibility
public function mount($model, $columns, $filters = [], $actions = [],
..., $sortBy = null, $sortDirection = null, $sort = null) {
// Handle sorting parameters with proper normalization
if (!empty($sortBy)) {
$this->sortColumn = $sortBy;
$this->sortBy = $sortBy;
}
if (!empty($sortDirection)) {
$this->sortDirection = in_array($sortDirection, ['asc', 'desc']) ? $sortDirection : 'asc';
} elseif (!empty($sort)) {
$this->sortDirection = in_array($sort, ['asc', 'desc']) ? $sort : 'desc';
}
// Keep syncronized
if (empty($this->sortBy) && !empty($this->sortColumn)) {
$this->sortBy = $this->sortColumn;
}
}
'sortBy' parameter (more intuitive)sortColumn (backward compatible)'sort' parameterFile: src/resources/views/livewire/datatable-trait.blade.php
Search Box - Before:
<div class="position-relative w-md-250px me-2">
<input type="text" wire:model.live.debounce.500ms="search"
placeholder="Search (min 3 chars)..."
class="form-control form-control-sm border-0 p-2 pe-4"
minlength="3">
[@if](https://github.com/if) (!empty($search))
<span class="position-absolute top-50 end-0 translate-middle-y me-2 cursor-pointer text-muted"
style="z-index: 1;" wire:click="$set('search', '')">
×
</span>
[@endif](https://github.com/endif)
</div>
Search Box - After:
<div class="position-relative">
<input type="text"
wire:model.live.debounce.500ms="search"
placeholder="🔍 Search (min 3 chars)..."
class="form-control form-control-sm border-0 p-3 ps-4 pe-5 shadow-sm bg-light"
minlength="3"
style="border-radius: 8px; font-size: 0.95rem;">
[@if](https://github.com/if) (!empty($search))
<button type="button"
class="position-absolute top-50 end-0 translate-middle-y me-3 btn btn-sm btn-link text-muted p-0"
wire:click="$set('search', '')"
style="z-index: 10; border: none; background: none; cursor: pointer;">
<i class="fas fa-times fa-fw"></i>
</button>
[@endif](https://github.com/endif)
</div>
Improvements:
Controls Row - Before:
<div class="row mb-2">
<div class="col"><!-- Search --></div>
<div class="col d-flex justify-content-end">
<!-- Buttons scattered -->
</div>
</div>
Controls Row - After:
<div class="row mb-3 gap-2">
<div class="col-12 col-lg"><!-- Search --></div>
<div class="col-12 col-lg-auto d-flex gap-2 justify-content-lg-end">
<!-- Buttons organized -->
</div>
</div>
Improvements:
gap-2Button Improvements:
title attributes for hover tooltipsbtn-smbtn-outline-*)[@livewire](https://github.com/livewire)('aftable', [
'sortBy' => 'column_key', // ✨ NEW - More intuitive
'sortDirection' => 'asc|desc', // ✅ Enhanced validation
'sort' => 'asc|desc', // ✅ Still supported (backward compat)
])
sortBy and sortColumn propertiestitle attributegap-2$sortBy - Now properly defined and syncedsortBy parameterOld Way (Still Works):
[@livewire](https://github.com/livewire)('aftable', [
'model' => 'App\Models\Item',
'columns' => [...],
'sort' => 'desc', // ✅ Still works
])
New Way (Recommended):
[@livewire](https://github.com/livewire)('aftable', [
'model' => 'App\Models\Item',
'columns' => [...],
'sortBy' => 'created_at', // ✅ More explicit
'sortDirection' => 'desc', // ✅ Clear parameter name
])
NONE - Full backward compatibility maintained! ✅
vendor/artflow-studio/table/
├── docs/
│ ├── SORTING_GUIDE.md (⭐ NEW)
│ ├── ENHANCED_FEATURES.md (⭐ NEW)
│ ├── AI_USAGE_GUIDE.md (Existing)
│ ├── USAGE_STUB.md (Existing)
│ └── AI_TECHNICAL_REFERENCE.md (Existing)
├── COMPLETE_GUIDE.md (⭐ NEW - Master reference)
├── README.md (Existing)
└── src/ (Package code)
| Feature | v1.5.1 | v1.5.2+ | Status |
|---|---|---|---|
| Basic Sorting | ✅ | ✅ | Improved |
sortBy Parameter |
❌ | ✅ | NEW |
sortDirection Parameter |
✅ | ✅ | Enhanced |
| Relationship Sorting | ✅ | ✅ | Documented |
| Count Sorting | ✅ | ✅ | Documented |
| JSON Sorting | ✅ | ✅ | Documented |
| Enhanced UI | ❌ | ✅ | NEW |
| SORTING_GUIDE.md | ❌ | ✅ | NEW |
| ENHANCED_FEATURES.md | ❌ | ✅ | NEW |
| COMPLETE_GUIDE.md | ❌ | ✅ | NEW |
| Performance Metrics | ❌ | ✅ | NEW |
| Troubleshooting Guide | Limited | ✅ | Enhanced |
composer require artflow-studio/table
[@livewire](https://github.com/livewire)('aftable', [
'model' => 'App\Models\Item',
'columns' => [
['key' => 'name', 'label' => 'Name'],
['key' => 'created_at', 'label' => 'Created'],
],
'sortBy' => 'created_at',
'sortDirection' => 'desc',
])
Auto-registers with Laravel 5.5+ via service provider discovery.
sortBy parameter support (user-friendly)This release focuses on:
sortBy parameter is more intuitiveNo breaking changes. All existing code continues to work!
Status: ✅ Production Ready
Tested: Extensively
Documented: Comprehensively
Performance: Optimized
Backward Compatible: ✅ Yes
Release Date: December 30, 2025
Version: 1.5.2+
How can I help you explore Laravel packages today?