Skip to content

Commit

Permalink
docs: configs
Browse files Browse the repository at this point in the history
  • Loading branch information
jevantang committed Apr 29, 2024
1 parent f734a70 commit 861d328
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 33 deletions.
5 changes: 5 additions & 0 deletions docs/artisan/started.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,8 @@ fresns back
## 4. Execute development

Execute development, management, and control commands in the plugin directory

- [Generate](create.md)
- [Development](development.md)
- [Control](control.md)
- [Management](management.md)
5 changes: 5 additions & 0 deletions docs/zh-Hans/artisan/started.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,8 @@ fresns back
```

## 4、在插件目录执行开发、管理、控制指令

- [创建新插件](create.md)
- [开发指令](development.md)
- [控制指令](control.md)
- [管理指令](management.md)
33 changes: 0 additions & 33 deletions docs/zh-Hans/command-word/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,6 @@ $wordBody = [
]);
```

::: details 可选方法
| 名称 | 说明 |
| --- | --- |
| `$FsDto` | 数据传输对象:通过 Fresns DTO Contract 为你完成入参的数据校验,以及定义入参的调用方式(FsDto 名可自定义)。 |
| `make([...])` | `...` 为请求参数的数组 |
| `array` | 返参对象的契约,可以不使用,使用则是定义返参对象的契约。<br>比如自己开发的返参类型的约束功能,封装后在此定义使用;也可以使用官方提供的契约。 |
:::

::: details 可选方法示例
```php
//$参数列表 = 数据传输对象::make(参数数组);
$wordBody = FsDto::make([
"email" => "收件地址",
"title" => "邮件标题",
"content" => "邮件内容"
]);

// \命令字立面::plugin('插件名')->命令字($参数列表): 定义返参对象的契约
\FresnsCmdWord::plugin('FresnsEmail')->sendEmail($wordBody);
```

**另一种写法**
```php
\FresnsCmdWord::plugin('FresnsEmail')->sendEmail(
FsDto::make([
"email" => "收件地址",
"title" => "邮件标题",
"content" => "邮件内容"
])
);
```
:::

## 结果输出 output

| 参数 | 说明 |
Expand Down

0 comments on commit 861d328

Please sign in to comment.