PHPackages                             xingchuangyang/dcat-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. xingchuangyang/dcat-admin-sortable

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

xingchuangyang/dcat-admin-sortable
==================================

dcat-admin 表格排序插件

v1.0.0(4y ago)51.3k1[2 issues](https://github.com/18310691938/doct-admin-sortable/issues)MITPHPPHP &gt;=7.1.0

Since Nov 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/18310691938/doct-admin-sortable)[ Packagist](https://packagist.org/packages/xingchuangyang/dcat-admin-sortable)[ Docs](https://github.com/xcy/dcat-admin-sortable)[ RSS](/packages/xingchuangyang-dcat-admin-sortable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Dcat Admin Sortable
===================

[](#dcat-admin-sortable)

截图
--

[](#截图)

[![](https://camo.githubusercontent.com/ead0e62215521cc403b712e3edf2da6beb3c9438ecbac82469b9ed1989370826/687474703a2f2f78637963657368692e6f73732d636e2d71696e6764616f2e616c6979756e63732e636f6d2f7869616f6c6975496d616765732f37356432376530316464666262303161636235326664633532333262626162312e706e67)](https://camo.githubusercontent.com/ead0e62215521cc403b712e3edf2da6beb3c9438ecbac82469b9ed1989370826/687474703a2f2f78637963657368692e6f73732d636e2d71696e6764616f2e616c6979756e63732e636f6d2f7869616f6c6975496d616765732f37356432376530316464666262303161636235326664633532333262626162312e706e67)

使用
--

[](#使用)

### 引入 composer 包

[](#引入-composer-包)

```
composer require xingchuangyang/dcat-admin-sortable
```

### 修改 Model

[](#修改-model)

引入 `SortableTrait`，并实现 `Sortable` 接口

```
namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Spatie\EloquentSortable\Sortable;
use Spatie\EloquentSortable\SortableTrait;

class Product extends Model implements Sortable
{
    use SortableTrait;

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

### 在 Controller 中使用

[](#在-controller-中使用)

```
$grid->column('sort', '排序')->action(\Xcy\DcatAdminSortable\Actions\SortableColumnRow::gen(\App\Models\Product::class));
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

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

1645d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/26a86407d9fb82943a7b9cea824481307ee254105c181c8adde5dafa57984e08?d=identicon)[xingcy](/maintainers/xingcy)

---

Top Contributors

[![xingcy08](https://avatars.githubusercontent.com/u/29391852?v=4)](https://github.com/xingcy08 "xingcy08 (3 commits)")

---

Tags

laravelmodeleloquentsortablesortextensiondcat admin

### Embed Badge

![Health badge](/badges/xingchuangyang-dcat-admin-sortable/health.svg)

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

###  Alternatives

[spatie/eloquent-sortable

Sortable behaviour for eloquent models

1.5k22.9M266](/packages/spatie-eloquent-sortable)[jedrzej/pimpable

Laravel 4/5/6 package that allows to dynamically filter, sort and eager load relations for your models using request parameters

105179.0k1](/packages/jedrzej-pimpable)[rutorika/sortable

Adds sortable behavior and ordering to Laravel Eloquent models. Grouping and many to many supported.

299992.5k14](/packages/rutorika-sortable)[jedrzej/sortable

Sortable trait for Laravel's Eloquent models - sort your models using request parameters

54261.0k1](/packages/jedrzej-sortable)[akaunting/laravel-sortable

Sortable behavior package for Laravel

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

PHPackages © 2026

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