Hotquestion.php 396 B

12345678910111213141516171819202122
  1. <?php
  2. namespace app\api\controller;
  3. use app\common\controller\Api;
  4. use think\Db;
  5. /**
  6. * 热门问题
  7. */
  8. class Hotquestion extends Api
  9. {
  10. protected $noNeedLogin = [];
  11. protected $noNeedRight = ['*'];
  12. //热门问题
  13. public function hotquestion(){
  14. $list = Db::name('hot_question')->autopage()->order('id desc')->select();
  15. $this->success('success',$list);
  16. }
  17. }