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

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

teamones/sku
============

001PHP

Since Mar 3Pushed 5y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

teamones extension 商品SKU

======

[![预览](1.png?raw=true)](1.png?raw=true)

安装
--

[](#安装)

```
composer require teamones/sku
```

配置
--

[](#配置)

### 配置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

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

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://avatars.githubusercontent.com/u/12838756?v=4)[weijer](/maintainers/weijer)[@weijer](https://github.com/weijer)

### Embed Badge

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

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

###  Alternatives

[rappasoft/laravel-livewire-tables

A dynamic table component for Laravel Livewire

2.0k3.0M31](/packages/rappasoft-laravel-livewire-tables)[szeidler/composer-patches-cli

28263.9k4](/packages/szeidler-composer-patches-cli)[wa72/html-pretty-min

HTML minifier and indenter that works on the DOM tree

22234.6k8](/packages/wa72-html-pretty-min)[veewee/reflecta

Unleash the Power of Optics in your code!

13477.2k7](/packages/veewee-reflecta)[apen/additional_reports

Useful information in the reports module : xclass, ajax, cliKeys, eID, general status of the system (encoding, DB, php vars...), hooks, compare local and TER extension (diff), used content type, used plugins, ExtDirect... It can really help you during migration or new existing project (to have a global reports of the system).

13170.7k](/packages/apen-additional-reports)[antistatique/swisstopo

Convert GPS (WGS84) to Swiss (LV03 and LV95) coordinates (and vice versa)

1481.8k](/packages/antistatique-swisstopo)

PHPackages © 2026

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