This commit is contained in:
2023-01-11 11:00:43 +08:00
commit ff55141a1e
791 changed files with 177427 additions and 0 deletions

4
modules/Mall/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
.idea
vendor
.DS_Store
composer.lock

37
modules/Mall/README.md Normal file
View 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');
```