PHPackages                             weiwait/dcat-orderable - 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. weiwait/dcat-orderable

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

weiwait/dcat-orderable
======================

dcat-admin column extension for orderable

1.0.1(4y ago)056↓66.7%2MITPHPPHP &gt;=7.4.0

Since May 7Pushed 4y ago1 watchersCompare

[ Source](https://github.com/weiwait/dcat-orderable)[ Packagist](https://packagist.org/packages/weiwait/dcat-orderable)[ Docs](https://github.com/weiwait/dcat-orderable)[ RSS](/packages/weiwait-dcat-orderable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Dcat Admin Extension
====================

[](#dcat-admin-extension)

Dcat Admin Extension
====================

[](#dcat-admin-extension-1)

### 演示地址

[](#演示地址)

[demo: http://dcat.weiwait.cn (admin:admin)](http://dcat.weiwait.cn/admin/demo-distpickers/create "user: admin psw: admin")

### 通过 composer 安装扩展

[](#通过-composer-安装扩展)

```
  composer require weiwait/dcat-orderable
```

### 更新 dcat-admin ide-helper

[](#更新-dcat-admin-ide-helper)

```
  php artisan admin:ide-helper
```

```
// 升序
$grid->model()->orderBy('order');
$grid->column('order')->sequencable();
class Model implements \Spatie\EloquentSortable\Sortable
{
    use \Weiwait\DcatOrderable\SortableTrait

    protected array $sortable = [
        'order_column_name' => 'order',
        // alias: 'column' => 'order'
        'sort_when_creating' => true, // default
        // alias: 'sortable' => true
    ]
}
// 降序
$grid->model()->orderByDesc('order');
$grid->column('order')->sequencable();

class Model implements \Spatie\EloquentSortable\Sortable
{
    use \Weiwait\DcatOrderable\SortableTrait

    protected array $sortable = [
        'order_column_name' => 'order',
        // alias: 'column' => 'order'
        'sort_when_creating' => true, // default
        // alias: 'sortable' => true
        'direction' => 'desc' // when using descend method is required
    ]
}

// 分组排序
// 一般场景：二级分类排序、商品根据分类排序...
$grid->model()->orderByDesc('order');
if (request('parent_id')) {
    $grid->column('order')->sequencable();
}
$grid->filter(function ($filter) {
    $filter->equal('parent_id')
        ->select([...$options])
})

class Model implements \Spatie\EloquentSortable\Sortable
{
    use \Weiwait\DcatOrderable\SortableTrait

    // an attribute of this model
    protected $parent_id;

    protected array $sortable = [
        'order_column_name' => 'order',
        // alias: 'column' => 'order'
        'sort_when_creating' => true, // default
        // alias: 'sortable' => true
        'direction' => 'desc' // when using descend method is required
        'restiction' => 'parent_id' // where('parent_id', $this->parent_id)
    ]
}
```

### Dcat-admin 扩展列表

[](#dcat-admin-扩展列表)

1. [图片裁剪](https://github.com/weiwait/dcat-cropper)
2. [区划级联+坐标拾取](https://github.com/weiwait/dcat-distpicker)
3. [smtp快速便捷配置](https://github.com/weiwait/dcat-smtp)
4. [sms channel 快速便捷配置](https://github.com/weiwait/dcat-easy-sms)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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 ~0 days

Total

2

Last Release

1464d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/74e0a539fde4f31941cf773ea8504fa105f6c48dd8d3665c3f5ea13304c82292?d=identicon)[weiwait](/maintainers/weiwait)

---

Tags

extensiondcat admin

### Embed Badge

![Health badge](/badges/weiwait-dcat-orderable/health.svg)

```
[![Health](https://phpackages.com/badges/weiwait-dcat-orderable/health.svg)](https://phpackages.com/packages/weiwait-dcat-orderable)
```

###  Alternatives

[sparkinzy/dcat-distpicker

省市区地址选择器，支持select2

272.7k1](/packages/sparkinzy-dcat-distpicker)[sparkinzy/dcat-marketplace

Dcat扩展市场

381.3k](/packages/sparkinzy-dcat-marketplace)

PHPackages © 2026

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