Brand.php 582 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace app\admin\controller\shop;
  3. use app\common\controller\Backend;
  4. /**
  5. * 品牌管理
  6. *
  7. * @icon fa fa-circle-o
  8. */
  9. class Brand extends Backend
  10. {
  11. /**
  12. * Brand模型对象
  13. * @var \app\admin\model\shop\Brand
  14. */
  15. protected $model = null;
  16. protected $noNeedRight = ["getList"];
  17. public function _initialize()
  18. {
  19. parent::_initialize();
  20. $this->model = new \app\admin\model\shop\Brand;
  21. }
  22. public function getList()
  23. {
  24. $list = $this->model->field('id,name')->select();
  25. return json($list);
  26. }
  27. }