PHPackages                             lyne007/laravel-admin-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. [Admin Panels](/categories/admin)
4. /
5. lyne007/laravel-admin-sku

ActiveLibrary[Admin Panels](/categories/admin)

lyne007/laravel-admin-sku
=========================

1.0.2(4y ago)142MITJavaScriptPHP &gt;=7.0.0

Since Sep 15Pushed 4y agoCompare

[ Source](https://github.com/lyne007/laravel-admin-sku)[ Packagist](https://packagist.org/packages/lyne007/laravel-admin-sku)[ Docs](https://github.com/lyne007/laravel-admin-sku)[ RSS](/packages/lyne007-laravel-admin-sku/feed)WikiDiscussions master Synced 2d ago

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

laravel-admin extension 商品SKU
=============================

[](#laravel-admin-extension-商品sku)

- 已修复编辑时price，stock为0情况
- 已修复编辑时增加id

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

安装
--

[](#安装)

```
composer require lyne007/laravel-admin-sku
php artisan vendor:publish --provider="Lyne007\LaravelAdminSku\SkuServiceProvider"
```

配置
--

[](#配置)

### 配置sku上传地址

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

文件路径【public/vendor/lyne007/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');

// 编辑
$form->sku('sku','商品SKU')->default($json);  // $json为下面的原始数据json
```

### 其他说明

[](#其他说明)

本扩展只会将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

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

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

Every ~355 days

Total

3

Last Release

1721d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/28702327?v=4)[李Lyne](/maintainers/lyne007)[@lyne007](https://github.com/lyne007)

---

Top Contributors

[![lyne007](https://avatars.githubusercontent.com/u/28702327?v=4)](https://github.com/lyne007 "lyne007 (16 commits)")[![wyzheng1997](https://avatars.githubusercontent.com/u/31637036?v=4)](https://github.com/wyzheng1997 "wyzheng1997 (1 commits)")

---

Tags

extensionlaravel-admin

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lyne007-laravel-admin-sku/health.svg)

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

###  Alternatives

[laravel-admin-ext/wang-editor

wangEditor extension for laravel-admin

6283.4k](/packages/laravel-admin-ext-wang-editor)[jadekun/sku

382.2k](/packages/jadekun-sku)[jonexyz/wang-editor-v4

laravel admin editor

161.4k](/packages/jonexyz-wang-editor-v4)[namet/laravel-admin-tagsinput

tagsinput for laravel-admin Form

102.7k](/packages/namet-laravel-admin-tagsinput)

PHPackages © 2026

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