SystemFaq.php 586 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace app\admin\model\dao;
  3. use app\common\model\UserModel;
  4. use think\facade\Db;
  5. class SystemFaq extends BaseDao
  6. {
  7. public static $table = "db_system_faq";
  8. public function __construct()
  9. {
  10. }
  11. public static function getTitleById($parent_id)
  12. {
  13. return Db::table(self::$table)->where(['id' => $parent_id])->value('title');
  14. }
  15. public static function getTopArrList()
  16. {
  17. return Db::table(self::$table)
  18. ->field('id,title')
  19. ->where(['parent_id' => 0])
  20. ->select()
  21. ->toArray();
  22. }
  23. }