Notice.php 794 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace app\admin\controller\routine;
  3. use app\common\controller\Backend;
  4. /**
  5. * 通知公告管理
  6. *
  7. */
  8. class Notice extends Backend
  9. {
  10. /**
  11. * Notice模型对象
  12. * @var \app\admin\model\Notice
  13. */
  14. protected $model = null;
  15. protected $quickSearchField = ['id'];
  16. protected $defaultSortField = 'weigh,desc';
  17. protected $preExcludeFields = ['createtime', 'updatetime'];
  18. public function initialize()
  19. {
  20. parent::initialize();
  21. $this->model = new \app\admin\model\Notice;
  22. }
  23. public function add()
  24. {
  25. $this->request->filter('trim,htmlspecialchars');
  26. parent::add();
  27. }
  28. public function edit($id = null)
  29. {
  30. $this->request->filter('trim,htmlspecialchars');
  31. parent::edit($id);
  32. }
  33. }