Advertisement.php 635 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace app\admin\model;
  3. use think\Model;
  4. /**
  5. * 广告模型
  6. */
  7. class Advertisement extends Model
  8. {
  9. /**
  10. * find数据筛选
  11. *
  12. * @access public
  13. * @return array 返回类型
  14. */
  15. public function findAst()
  16. {
  17. $result = $this->find();
  18. return $result;
  19. }//end findAst()
  20. /**
  21. * 数据修改
  22. *
  23. * @access public
  24. * @param mixed $data 数据
  25. * @return array 返回类型
  26. */
  27. public function updateAst($data)
  28. {
  29. $result = $this->where(['advertisement_id' => 1])->update($data);
  30. return $result;
  31. }//end updateAst()
  32. }