Customsearch.php 513 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace app\admin\controller\example;
  3. use app\common\controller\Backend;
  4. /**
  5. * 自定义搜索
  6. *
  7. * @icon fa fa-search
  8. * @remark 自定义列表的搜索
  9. */
  10. class Customsearch extends Backend
  11. {
  12. protected $model = null;
  13. public function _initialize()
  14. {
  15. parent::_initialize();
  16. $this->model = model('AdminLog');
  17. $ipList = $this->model->whereTime('createtime', '-37 days')->group("ip")->column("ip,ip as aa");
  18. $this->view->assign("ipList", $ipList);
  19. }
  20. }