Skill.php 1012 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace app\agent\controller\order;
  3. use app\common\controller\AgentController;
  4. use app\http\IResponse;
  5. use Lettered\Support\Auth as IAuth;
  6. use think\App;
  7. class Skill extends AgentController
  8. {
  9. protected $model;
  10. /**
  11. * Skill constructor.
  12. * @param App|null $app
  13. * @param IAuth $auth
  14. */
  15. public function __construct(App $app = null, IAuth $auth)
  16. {
  17. parent::__construct($app, $auth);
  18. $this->model = new \app\agent\model\order\Skill();
  19. }
  20. /**
  21. * @desc desc
  22. * @return mixed
  23. * @throws \think\exception\DbException
  24. * @author weichuanbao<654745815@qq.com>
  25. * @date 2021/12/10 0010
  26. */
  27. public function index()
  28. {
  29. $where[] = ['area_id', 'eq', $this->auth->user()->area_id];
  30. return IResponse::paginate($this->model->where($where)->with(['skill','user','service'])
  31. ->order(['created_at' => 'desc'])
  32. ->paginate(input('limit'),false));
  33. }
  34. }