PHPackages                             am2studio/laravel-table-sorter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. am2studio/laravel-table-sorter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

am2studio/laravel-table-sorter
==============================

Laravel table sorter

3.0(9y ago)24.8k2MITPHPPHP &gt;=5.4.0CI failing

Since Feb 16Pushed 3y ago6 watchersCompare

[ Source](https://github.com/AM2studio/Laravel-TableSorter)[ Packagist](https://packagist.org/packages/am2studio/laravel-table-sorter)[ Docs](https://github.com/AM2studio/Laravel-TableSorter)[ RSS](/packages/am2studio-laravel-table-sorter/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (17)Used By (0)

Laravel-TableSorter
===================

[](#laravel-tablesorter)

Package contains helper function for creating sortable colums in table

Install
-------

[](#install)

Via Composer

```
$ composer require am2studio/laravel-table-sorter
```

Usage
-----

[](#usage)

Code in view :

```
{{ \AM2Studio\Laravel\TableSorter\TableSorter::sort(
    [
      ['name' => 'first_name', 'title' => trans('ui.user.first_name')],
      ['name' => 'last_name',  'title' => trans('ui.user.last_name')],
      ['name' => 'gender',     'title' => trans('ui.user.gender')],
    ],
    $users,
    [
        'sort_by' => 'name', 'sort_type' => 'ASC',
        'template' => '%s'
    ])
}}
```

variable $headings contains name and title for table columns, example for users

```
[
  ['name' => 'first_name', 'title' => trans('ui.user.first_name')],
  ['name' => 'last_name',  'title' => trans('ui.user.last_name')],
  ['name' => 'gender',     'title' => trans('ui.user.gender')],
]
```

variable $config contains default sort\_by/sort\_type and template

```
[
    'sort_by' => 'name', 'sort_type' => 'ASC',
    'template' => '%s'
]
```

Controller code:

```
public function index()
{
    $users = (new User)->paginate(10);
    return $this->view('index', compact('users'));
}
```

Full view table :

```

			{{ \AM2Studio\Laravel\TableSorter\TableSorter::sort(
					[
						['name' => 'first_name', 'title' => trans('ui.user.first_name')],
						['name' => 'last_name',  'title' => trans('ui.user.last_name')],
						['name' => 'gender',     'title' => trans('ui.user.gender')],
					],
					$users,
					[
						'sort_by' => 'name', 'sort_type' => 'ASC',
						'template' => '%s'
					])
			}}

		@foreach($users as $user)

			{{ $user->first_name }}
			{{ $user->last_name }}
			{{ $user->gender }}

		@endforeach

{!! $users !!}
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 81.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Recently: every ~92 days

Total

13

Last Release

3346d ago

Major Versions

1.0.6 → 2.1.02016-04-22

2.2.3 → 3.02017-02-09

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4154034?v=4)[Marko Samec](/maintainers/msamec)[@msamec](https://github.com/msamec)

---

Top Contributors

[![fico7489](https://avatars.githubusercontent.com/u/4559663?v=4)](https://github.com/fico7489 "fico7489 (26 commits)")[![josipjelic](https://avatars.githubusercontent.com/u/91408?v=4)](https://github.com/josipjelic "josipjelic (4 commits)")[![anorgan](https://avatars.githubusercontent.com/u/1270389?v=4)](https://github.com/anorgan "anorgan (1 commits)")[![momic](https://avatars.githubusercontent.com/u/16066753?v=4)](https://github.com/momic "momic (1 commits)")

---

Tags

AM2StudioLaravel table sorter

### Embed Badge

![Health badge](/badges/am2studio-laravel-table-sorter/health.svg)

```
[![Health](https://phpackages.com/badges/am2studio-laravel-table-sorter/health.svg)](https://phpackages.com/packages/am2studio-laravel-table-sorter)
```

###  Alternatives

[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17818.7k](/packages/markwalet-nova-modal-response)[crumbls/layup

A visual page builder plugin for Filament 5 — Divi-style grid layouts with extensible widgets.

591.7k1](/packages/crumbls-layup)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.2k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
