fisrt
This commit is contained in:
4
modules/Mall/.gitignore
vendored
Normal file
4
modules/Mall/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
.idea
|
||||
vendor
|
||||
.DS_Store
|
||||
composer.lock
|
||||
37
modules/Mall/README.md
Normal file
37
modules/Mall/README.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# UzTech Mall Module 多用户商城模块
|
||||
|
||||
## 1. 使用
|
||||
|
||||
> php artisan module:publish-config Mall
|
||||
|
||||
## 2. traits 说明
|
||||
|
||||
### 1. UserHasAddress 用户地址列表
|
||||
|
||||
## 3. 功能说明
|
||||
|
||||
### 1. 物流管理,主后台添加一个主表,各商户,通过多对多的关系来确定使用哪些物流
|
||||
|
||||
### 2.
|
||||
|
||||
## 4. 工作流说明
|
||||
|
||||
> 参考文档
|
||||
>
|
||||
> https://github.com/brexis/laravel-workflow
|
||||
>
|
||||
> https://symfony.com/doc/current/components/workflow.html
|
||||
|
||||
```php
|
||||
$order = Order::find(2);
|
||||
// 方法1
|
||||
$app = app('workflow');
|
||||
$workflow = $app->get($order);
|
||||
if ($workflow->can($order, 'pay')) {
|
||||
$workflow->apply($order, 'pay')
|
||||
}
|
||||
// 方法2,引入 WithWorkflow
|
||||
$order->can('pay');
|
||||
// 方法3
|
||||
$workflow = Modules\Mall\Facades\Workflow::get($order)->can('pay');
|
||||
```
|
||||
Reference in New Issue
Block a user