WxappHelp.php 803 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace app\common\model;
  3. /**
  4. * 小程序帮助中心
  5. * Class WxappHelp
  6. * @package app\common\model
  7. */
  8. class WxappHelp extends BaseModel
  9. {
  10. protected $name = 'wxapp_help';
  11. /**
  12. * 获取帮助列表
  13. * @return false|\PDOStatement|string|\think\Collection
  14. * @throws \think\db\exception\DataNotFoundException
  15. * @throws \think\db\exception\ModelNotFoundException
  16. * @throws \think\exception\DbException
  17. */
  18. public function getList()
  19. {
  20. return $this->order(['sort' => 'asc', $this->getPk() => 'desc'])->select();
  21. }
  22. /**
  23. * 帮助详情
  24. * @param $help_id
  25. * @return null|static
  26. * @throws \think\exception\DbException
  27. */
  28. public static function detail($help_id)
  29. {
  30. return self::get($help_id);
  31. }
  32. }