ArticleCategory.php 887 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace app\controller\api\article;
  3. use think\App;
  4. use app\common\repositories\article\ArticleCategoryRepository as repository;
  5. use ln\basic\BaseController;
  6. class ArticleCategory extends BaseController
  7. {
  8. /**
  9. * @var repository
  10. */
  11. protected $repository;
  12. /**
  13. * StoreBrand constructor.
  14. * @param App $app
  15. * @param repository $repository
  16. */
  17. public function __construct(App $app, repository $repository)
  18. {
  19. parent::__construct($app);
  20. $this->repository = $repository;
  21. }
  22. /**
  23. * @return mixed
  24. * @throws \think\db\exception\DataNotFoundException
  25. * @throws \think\db\exception\DbException
  26. * @throws \think\db\exception\ModelNotFoundException
  27. * @author Qinii
  28. */
  29. public function lst()
  30. {
  31. return app('json')->success($this->repository->apiGetArticleCategory());
  32. }
  33. }