ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## 插件开发示例 ~~~ <?php namespace addons\ceshi\controller; use addons\BaseController; ├─BaseController [插件的公共控制器,可继承于它] # 演示插件 class Ceshi extends BaseController { public function initialize() { parent::initialize(); } # 管理入口 public function manage() { return view('../addons/ceshi/view/admin/manage.html', []); } # 测试提交 public function add() { $data = [ 'name' => 'thinkphp', 'telphone' => 121, ]; $validate = new ShopValidate(); $result = $validate->check($data); if(!$result){ echo $validate->getError(); } ShopModel::create($data); $this->success('操作成功'); } } ~~~