PHPackages                             jyoz1130/dcat-sku-plus - 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. jyoz1130/dcat-sku-plus

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

jyoz1130/dcat-sku-plus
======================

基于Dcat Admin的SKU扩展增强版

010PHP

Since Nov 18Pushed 3y agoCompare

[ Source](https://github.com/jyoz1130/dcat-sku-plus)[ Packagist](https://packagist.org/packages/jyoz1130/dcat-sku-plus)[ RSS](/packages/jyoz1130-dcat-sku-plus/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

fork for 个人定制使用

安装
--

[](#安装)

#### composer安装

[](#composer安装)

```
composer require jyoz1130/dcat-sku-plus
```

#### 发布资源

[](#发布资源)

```
 php artisan vendor:publish --tag=public --force
```

使用
--

[](#使用)

```
// app/Admin/Controllers/ProductController.php

protected function form()
{
    return Form::make(new Product(), function (Form $form) {
        $skuParams = [
            // 扩展第一列
            [
                'name'    => '会员价', // table 第一行 title
                'field'   => 'member_price', // input 的 field_name 名称
                'default' => 5, // 默认值
            ],
            // 扩展第二列
        ];
        // 新增时
        $form->sku('sku', '生成SKU')->addColumn($skuParams);

        // 编辑时
        $skuData = []; // 数据结构见附录
        $skuString = json_encode($skuData);
        $form->sku('sku', '生成SKU')->addColumn($skuParams)->value($skuString);

        // 获取提交的数据.
        $form->saving(function (Form $form) {
            // 拿到SKU数据，按照业务逻辑做响应处理即可。
            dd($form->input('sku'));
        });
    });
}
```

附录
--

[](#附录)

#### 最终生成的SKU数据结构，仅供参考

[](#最终生成的sku数据结构仅供参考)

```
{
  "attrs": {
    "测试": [
      "测试1",
      "测试2"
    ],
    "颜色": [
      "绿",
      "黄"
    ],
    "含电池": [
      "含电池"
    ],
    "内存": [
      "8G"
    ]
  },
  "sku": [
    {
      "测试": "测试1",
      "颜色": "绿",
      "含电池": "含电池",
      "内存": "8G",
      "pic": [
        {
          "short_url": "sku/HjdrG0RpfIwI3kkgpNNFfmxPasgaOLg6bBPOCDxd.jpg",
          "full_url": "http://127.0.0.1:8000/storage/sku/HjdrG0RpfIwI3kkgpNNFfmxPasgaOLg6bBPOCDxd.jpg"
        },
        {
          "short_url": "sku/bkucABLjzRQ5pEHYX0gwdS1VxJrS6ObiQCIWVvIl.png",
          "full_url": "http://127.0.0.1:8000/storage/sku/bkucABLjzRQ5pEHYX0gwdS1VxJrS6ObiQCIWVvIl.png"
        }
      ],
      "stock": "",
      "price": "",
      "member_price": 5
    }
  ]
}
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/18227dffd209d32ef9c9eed9126991309a1d4ec2f6aa4a8c2c591f633bd7dd1b?d=identicon)[jyoz1130](/maintainers/jyoz1130)

---

Top Contributors

[![orxz](https://avatars.githubusercontent.com/u/64585115?v=4)](https://github.com/orxz "orxz (5 commits)")[![Abbotton](https://avatars.githubusercontent.com/u/16308633?v=4)](https://github.com/Abbotton "Abbotton (4 commits)")

### Embed Badge

![Health badge](/badges/jyoz1130-dcat-sku-plus/health.svg)

```
[![Health](https://phpackages.com/badges/jyoz1130-dcat-sku-plus/health.svg)](https://phpackages.com/packages/jyoz1130-dcat-sku-plus)
```

###  Alternatives

[beebmx/kirby-env

Enable env variables to Kirby

2037.9k2](/packages/beebmx-kirby-env)[aschmelyun/size

Simple PHP helper to convert bytes to different sizes

471.2k](/packages/aschmelyun-size)

PHPackages © 2026

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