Log.php 656 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace app\admin\controller\crud;
  3. use app\admin\model\CrudLog;
  4. use app\common\controller\Backend;
  5. /**
  6. * crud记录
  7. *
  8. */
  9. class Log extends Backend
  10. {
  11. /**
  12. * Log模型对象
  13. * @var CrudLog
  14. */
  15. protected $model = null;
  16. protected $preExcludeFields = ['id', 'create_time'];
  17. protected $quickSearchField = ['id', 'table_name'];
  18. protected $noNeedPermission = ['index'];
  19. public function initialize()
  20. {
  21. parent::initialize();
  22. $this->model = new CrudLog;
  23. if (!$this->auth->check('crud/crud/index')) {
  24. $this->error(__('You have no permission'), [], 401);
  25. }
  26. }
  27. }