Files
water_new/modules/Mall/README.md
2023-03-08 09:16:04 +08:00

37 lines
812 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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');
```