Description
Package for handling column sorting
Use Sortable trait inside your Eloquent model(s). Define $sortable array (see example code below).
NOTE:
Scheme::hasColumn()is run only when$sortableis not defined - less DB hits per request.
use Kyslik\ColumnSortable\Sortable; class User extends Model implements AuthenticatableContract, CanResetPasswordContract{ use Authenticatable, CanResetPassword, Sortable; ... public $sortable = ['id', 'name', 'email', 'created_at', 'updated_at']; ...}
You're set to go.
Sortable trait adds Sortable scope to the models so you can use it with paginate.
Blade Extension
There is a blade extension for you to use @sortablelink()
@sortablelink('column', 'Title', ['parameter' => 'smile'], ['rel' => 'nofollow'])
Recent Courses on Laravel Daily
AI Agents/IDEs for Laravel: May 2026 (Claude Code, Codex, OpenCode, etc)
7 lessons
52 min
Next.js Basics for Laravel Developers
11 lessons
58 min
Queues in Laravel 13
18 lessons
1 h 12 min read