Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Table Laravel Package

artflow-studio/table

View on GitHub
Deep Wiki
Context7

🎯 ArtFlow Table v1.5.2+ - Quick Summary

Updated: December 30, 2025
Status: ✅ Production Ready


⚡ What Changed

Core Issue Fixed

Before: 'sortBy' parameter didn't work (threw undefined variable error)
After: Full support for 'sortBy' and 'sortDirection' parameters

Code You Can Use Now

[@livewire](https://github.com/livewire)('aftable', [
    'model' => 'App\Models\Transaction',
    'columns' => [
        ['key' => 'date', 'label' => 'Date'],
        ['key' => 'amount', 'label' => 'Amount'],
        ['key' => 'category_id', 'relation' => 'category:name', 'label' => 'Category'],
    ],
    'sortBy' => 'date',              // ✅ Now works!
    'sortDirection' => 'desc',       // ✅ Now works!
])

📚 New Documentation

3 new comprehensive guides added:

  1. SORTING_GUIDE.md ⭐ START HERE for sorting

    • Complete sorting guide (2000+ lines)
    • Basic to advanced examples
    • Real-world scenarios
    • Troubleshooting
  2. ENHANCED_FEATURES.md - Advanced features

    • Performance optimization
    • Security features
    • Advanced customization
    • Enterprise examples
  3. COMPLETE_GUIDE.md - Master reference

    • Quick start
    • All parameters
    • Real examples
    • Quick reference card

🎨 UI Improvements

Search Box:

  • Wider on desktop ✅
  • Better styling ✅
  • Search emoji icon ✅
  • Improved clear button ✅

Button Group:

  • Font Awesome icons ✅
  • Hover tooltips ✅
  • Better spacing ✅
  • Responsive layout ✅

🚀 Quick Start

Transaction Table (Sorted by Date, Newest First)

[@livewire](https://github.com/livewire)('aftable', [
    'model' => 'App\Models\AccountFlow\Transaction',
    'columns' => [
        ['key' => 'date', 'label' => 'Date'],
        ['key' => 'amount', 'label' => 'Amount'],
        ['key' => 'description', 'label' => 'Description'],
        ['key' => 'category_id', 'relation' => 'category:name', 'label' => 'Category'],
        ['key' => 'account_id', 'relation' => 'account:name', 'label' => 'Account'],
    ],
    'sortBy' => 'date',              // Sort by date column
    'sortDirection' => 'desc',       // Newest first
    'records' => 25,                 // 25 per page
])

✅ All Sorting Options

Parameter Value Example
sortBy column_key 'sortBy' => 'date'
sortDirection 'asc' or 'desc' 'sortDirection' => 'desc'
sort 'asc' or 'desc' 'sort' => 'desc' (backward compat)

🎯 Sortable Column Types

Type Sortable Example
Database Column ['key' => 'name']
Relationship ['relation' => 'user:name']
Count ['key' => 'items_count']
JSON ['json' => 'field']
Function ['function' => 'getStatus']
Raw HTML ['raw' => '<button>']

🐛 Common Issues Fixed

Issue Solution
"Undefined variable $sortBy" ✅ Fixed - property now defined
sortBy parameter ignored ✅ Fixed - now fully supported
Sort not working ✅ Enhanced - better validation
Blade rendering error ✅ Fixed - template improved
Poor mobile UI ✅ Fixed - responsive design

📂 Package Contents

vendor/artflow-studio/table/
├── docs/
│   ├── SORTING_GUIDE.md              (⭐ New - Sorting Guide)
│   ├── ENHANCED_FEATURES.md          (⭐ New - Advanced Features)
│   ├── AI_USAGE_GUIDE.md             (Quick Guide)
│   ├── USAGE_STUB.md                 (All Parameters)
│   └── AI_TECHNICAL_REFERENCE.md     (Technical Details)
├── src/
│   ├── Http/Livewire/
│   │   └── DatatableTrait.php        (✅ Updated)
│   └── resources/views/
│       └── livewire/
│           └── datatable-trait.blade.php  (✅ Improved UI)
├── COMPLETE_GUIDE.md                 (⭐ New - Master Reference)
├── CHANGELOG_V1.5.2.md               (⭐ New - What Changed)
└── README.md

📊 Performance

Still Single Query Design:

  • 50 items = 1 query ✅
  • Search + Sort + Filter = 1 query ✅
  • Automatic eager loading ✅
  • Query caching (5 min TTL) ✅
  • Chunked export (handles 100K+ rows) ✅

🎓 Learning Path

5 minutes: Read this file
15 minutes: Read SORTING_GUIDE.md Quick Start
1 hour: Read ENHANCED_FEATURES.md
Always: Use COMPLETE_GUIDE.md as reference


🚀 Implementation Example

Before (Broken):

[@livewire](https://github.com/livewire)('aftable', [
    'model' => 'App\Models\Item',
    'columns' => [...],
    'sortBy' => 'name',              // ❌ Threw error
    'sortDirection' => 'asc',        // ❌ Ignored
])

After (Works):

[@livewire](https://github.com/livewire)('aftable', [
    'model' => 'App\Models\Item',
    'columns' => [...],
    'sortBy' => 'name',              // ✅ Works!
    'sortDirection' => 'asc',        // ✅ Works!
])

💡 Pro Tips

  1. For Relationships:

    'columns' => [
        ['key' => 'customer_name', 'relation' => 'customer:name'],
    ],
    'sortBy' => 'customer_name',  // Sorts by customer.name
    
  2. For Counts:

    'columns' => [
        ['key' => 'items_count'],  // Auto-detected
    ],
    'sortBy' => 'items_count',    // Sorts by COUNT(items)
    
  3. For Newest First:

    'sortBy' => 'created_at',
    'sortDirection' => 'desc',
    
  4. For A-Z Order:

    'sortBy' => 'name',
    'sortDirection' => 'asc',
    

🔗 Quick Links


✨ What You Get

✅ Full sortBy parameter support
✅ Better UI/UX
✅ 3 new comprehensive guides
✅ Performance benchmarks
✅ Real-world examples
✅ 100% backward compatible
✅ Production ready


🎯 Next Steps

  1. Review SORTING_GUIDE.md
  2. Update your table code with sortBy and sortDirection
  3. Test the transactions page
  4. Use COMPLETE_GUIDE.md as reference

Status: ✅ Ready to Use
Version: 1.5.2+
Updated: December 30, 2025

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle