Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
eddy8 committed Mar 14, 2020
1 parent a64ce2c commit 605aa94
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ $siteName = config('light_config.SITE_NAME');

如果想自定义模型的保存和更新处理逻辑,只需在`app/Http/Controllers/Admin/Entity`目录下创建模型的控制器类即可,`save``update`方法实现可参考`app/Http/Controllers/Admin/ContentController`。类名的命名规则:**模型名+Controller**。例如`User`模型对应的控制器类为`UserController`。同理,如果想自定义列表页,按上述规则定义`index``list`方法即可。

另外,模型内容在新增、更新、删除完成时系统会触发对应的`App\Events\ContentCreated``App\Events\ContentUpdated``App\Events\ContentDeleted`事件,你可以监听这些事件做相应的业务处理。

### 模型字段表单类型相关说明
对于支持远程搜索的`select`表单类型,后端 API 搜索接口需返回的数据格式如下所示。code为0时, 表示正常, 反之异常。
```json
Expand Down

0 comments on commit 605aa94

Please sign in to comment.