Customform.php 700 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace app\admin\controller\example;
  3. use app\common\controller\Backend;
  4. /**
  5. * 自定义表单示例
  6. *
  7. * @icon fa fa-table
  8. * @remark FastAdmin支持在控制器间跳转,点击后将切换到另外一个TAB中,无需刷新当前页面
  9. */
  10. class Customform extends Backend
  11. {
  12. protected $model = null;
  13. public function _initialize()
  14. {
  15. parent::_initialize();
  16. $this->model = model('AdminLog');
  17. }
  18. public function index()
  19. {
  20. if ($this->request->isPost()) {
  21. $this->success("提交成功", null, ['data' => json_encode($this->request->post("row/a"), JSON_UNESCAPED_UNICODE)]);
  22. }
  23. return $this->view->fetch();
  24. }
  25. }