PHPackages                             dongdonggo/sku - 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. dongdonggo/sku

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

dongdonggo/sku
==============

04JavaScript

Since Apr 6Pushed 6y agoCompare

[ Source](https://github.com/dongdonggo/sku)[ Packagist](https://packagist.org/packages/dongdonggo/sku)[ RSS](/packages/dongdonggo-sku/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (0)

在 基础上 添加了。 单规格情况 商品原价，卖价 库存； 统一管理

安装
--

[](#安装)

```
composer require dongdonggo/sku
php artisan vendor:publish --provider="Dongdonggo\Sku\SkuServiceProvider"
```

//  ---文档
laravel-admin extension 商品SKU
========================================================================

[](#-httpsgithubcomjade-kunsku-----文档laravel-admin-extension-商品sku)

[![预览](https://github.com/jade-kun/sku/raw/master/1.png?raw=true)](https://github.com/jade-kun/sku/blob/master/1.png?raw=true)

安装
--

[](#安装-1)

```
composer require jadekun/sku
php artisan vendor:publish --provider="JadeKun\Sku\SkuServiceProvider"
```

配置
--

[](#配置)

### 配置sku上传地址

[](#配置sku上传地址)

文件路径【public/vendor/jadekun/sku/sku.js】

```
const UploadHost = '/admin/upload_file';
```

php进行存储

```
// key为file
if($request->hasFile('file')) {
    $file = $request->file('file');
    $path = $file->store('images');

    // 返回格式
    return ['url'=> Storage::url($path)];
}
```

### 数据库字段配置

[](#数据库字段配置)

- 数据类型json

### 使用方法

[](#使用方法)

```
$form->sku('sku','商品SKU');
```

### 其他说明

[](#其他说明)

本扩展只会将SKU数据写指定的字段中，如需个性化处理数据，请在【表单回调】中处理

原始数据

```
{
	"type": "many", // many多规格；single单规格
	"attrs": {"尺寸": ["XL", "XXL", "XXXL"], "颜色": ["黑", "灰色"]},
    "sku": [{"pic": "", "price": "89", "stock": "100", "尺寸": "XL", "颜色": "黑"}, {
        "pic": "",
        "price": "89",
        "stock": "100",
        "尺寸": "XL",
        "颜色": "灰色"
    }, {"pic": "", "price": "89", "stock": "100", "尺寸": "XXL", "颜色": "黑"}, {
        "pic": "",
        "price": "89",
        "stock": "100",
        "尺寸": "XXL",
        "颜色": "灰色"
    }, {"pic": "", "price": "89", "stock": "100", "尺寸": "XXXL", "颜色": "黑"}, {
        "pic": "",
        "price": "89",
        "stock": "100",
        "尺寸": "XXXL",
        "颜色": "灰色"
    }]
}
```

```
$form->sku('sku','商品SKU');

// 处理数据
$form->saving(function($form) {
    dd($form->sku);
});
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd30745ee22a8c6a5a059359b8ae392088f34e60dc3e09f82ad9d28432a6aeb1?d=identicon)[donggo](/maintainers/donggo)

---

Top Contributors

[![dongdonggo](https://avatars.githubusercontent.com/u/20265027?v=4)](https://github.com/dongdonggo "dongdonggo (8 commits)")

### Embed Badge

![Health badge](/badges/dongdonggo-sku/health.svg)

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

###  Alternatives

[m1/env

Env is a lightweight library bringing .env file parser compatibility to PHP. In short - it enables you to read .env files with PHP.

6412.0M21](/packages/m1-env)[roave/psalm-html-output

Psalm HTML Output

23312.0k1](/packages/roave-psalm-html-output)[pear/system_daemon

A port of the PEAR class to create Daemons with pure PHP

11139.9k1](/packages/pear-system-daemon)[mateffy/laravel-codebase-mcp

An MCP server to give Cursor, Aider, etc. the ability to introspect your Laravel codebase directly, by querying for your models, views, routes and classes without raw file search.

201.1k](/packages/mateffy-laravel-codebase-mcp)

PHPackages © 2026

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