SectionController.php 694 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\api\controller\company;
  3. use app\models\section\SectionModel;
  4. use app\Request;
  5. use crmeb\services\UtilService;
  6. class SectionController
  7. {
  8. public function list(Request $request)
  9. {
  10. $where = UtilService::getMore([
  11. [['page', 'd'], 1],
  12. [['limit', 'd'], 15],
  13. [['status', 0], 1]
  14. ], $request);
  15. if ($where['status'] == '') $where['status'] = 1;
  16. $list = SectionModel::systemPage($where);
  17. return app('json')->successful($list);
  18. }
  19. public function details($id)
  20. {
  21. $info = SectionModel::where('is_del', 0)->find($id)->toArray();
  22. return app('json')->successful($info);
  23. }
  24. }