PHPackages                             james.xue/laravel-admin-sortable - 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. [Database &amp; ORM](/categories/database)
4. /
5. james.xue/laravel-admin-sortable

ActiveLibrary[Database &amp; ORM](/categories/database)

james.xue/laravel-admin-sortable
================================

Sortable behaviour for eloquent models

1.0(7y ago)77.8k2MITPHPPHP &gt;=7.0.0CI passing

Since Jun 4Pushed 1mo agoCompare

[ Source](https://github.com/xiaoxuan6/laravel-admin-sortable)[ Packagist](https://packagist.org/packages/james.xue/laravel-admin-sortable)[ Docs](https://github.com/laravel-admin-ext/laravel-admin-sortable)[ RSS](/packages/jamesxue-laravel-admin-sortable/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (4)Versions (6)Used By (0)

这个扩展包用来 sortable

Screenshot
----------

[](#screenshot)

[![screenshot](https://github.com/xiaoxuan6/laravel-admin-sortable/raw/master/20190225154750.png)](https://github.com/xiaoxuan6/laravel-admin-sortable/blob/master/20190225154750.png)

Installation First, install dependencies:

```
composer require james.xue/laravel-admin-sortable

```

Second, Modified model

```
use James\Sortable\SortableTrait;
use James\Sortable\Sortable;

class Test extends Model implements Sortable
{
    use SortableTrait;

    public $sortable = [
        'sort_field' => 'status',       // 排序字段
        'sort_when_creating' => true,   // 新增是否自增，默认自增
    ];

}

```

Configuration In the extensions section of the config/admin.php file, add some configuration that belongs to this extension.

```
 'extensions' => [
     'sortableColumn' => [
         // set to false if you want to disable this extension
         'enable' => true,
     ]
 ]

```

User

```
   $grid = new Grid(new Test);
   $grid->model()->orderBy('status', 'asc');            // 这个很重要，否则页面显示顺序不正确

   $grid->status('状态')->sortableColumn('\App\Test');  // sortableColumn 里面必须填入当前模型的 namespace ,
   OR
   $grid->status('状态')->sortableColumn(Test::class);

```

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance60

Regular maintenance activity

Popularity28

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.5% 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

Unknown

Total

1

Last Release

2587d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f8fdd2069c7594101452a5c802ae01209a31109d67a9299a67320752c30a1de?d=identicon)[xiaoxuan6](/maintainers/xiaoxuan6)

---

Top Contributors

[![xiaoxuan6](https://avatars.githubusercontent.com/u/32762220?v=4)](https://github.com/xiaoxuan6 "xiaoxuan6 (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![ImgBotApp](https://avatars.githubusercontent.com/u/31427850?v=4)](https://github.com/ImgBotApp "ImgBotApp (1 commits)")

---

Tags

sortableextensionlaravel-admin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jamesxue-laravel-admin-sortable/health.svg)

```
[![Health](https://phpackages.com/badges/jamesxue-laravel-admin-sortable/health.svg)](https://phpackages.com/packages/jamesxue-laravel-admin-sortable)
```

###  Alternatives

[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.7M223](/packages/backpack-crud)[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11223.5M33](/packages/anourvalar-eloquent-serialize)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[umbrellio/laravel-pg-extensions

Extensions for Postgres Laravel

103451.2k1](/packages/umbrellio-laravel-pg-extensions)[laravel-admin-ext/grid-sortable

Sort the grid data by drag and drop rows

42123.7k](/packages/laravel-admin-ext-grid-sortable)[akaunting/laravel-sortable

Sortable behavior package for Laravel

27195.7k](/packages/akaunting-laravel-sortable)

PHPackages © 2026

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