Modules_Api_Controllers_KeywordsController.proxy.php 668 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace Modules\Api\Controllers;
  3. use App\Repositories\KeywordsHotRepository;
  4. class KeywordsController extends BaseController
  5. {
  6. use \Hyperf\Di\Aop\ProxyTrait;
  7. use \Hyperf\Di\Aop\PropertyHandlerTrait;
  8. function __construct()
  9. {
  10. if (method_exists(parent::class, '__construct')) {
  11. parent::__construct(...func_get_args());
  12. }
  13. $this->__handlePropertyHandler(__CLASS__);
  14. }
  15. /**
  16. * 关键词热度排行10
  17. * @return mixed
  18. */
  19. public function hotTop()
  20. {
  21. $hotRepo = make(KeywordsHotRepository::class);
  22. $items = $hotRepo->hotTop();
  23. return json_success($items);
  24. }
  25. }