ArticleCategory.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\controller\api\article;
  12. use think\App;
  13. use app\common\repositories\article\ArticleCategoryRepository as repository;
  14. use crmeb\basic\BaseController;
  15. class ArticleCategory extends BaseController
  16. {
  17. /**
  18. * @var repository
  19. */
  20. protected $repository;
  21. /**
  22. * StoreBrand constructor.
  23. * @param App $app
  24. * @param repository $repository
  25. */
  26. public function __construct(App $app, repository $repository)
  27. {
  28. parent::__construct($app);
  29. $this->repository = $repository;
  30. }
  31. /**
  32. * @return mixed
  33. * @throws \think\db\exception\DataNotFoundException
  34. * @throws \think\db\exception\DbException
  35. * @throws \think\db\exception\ModelNotFoundException
  36. * @author Qinii
  37. */
  38. public function lst()
  39. {
  40. return app('json')->success($this->repository->apiGetArticleCategory());
  41. }
  42. }