RegionService.php 772 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * @Name
  4. * @Description
  5. * @Author 刘学玺
  6. * @Date 2023/11/23 20:57
  7. */
  8. namespace App\Http\Services\Admin\System;
  9. use App\Http\Services\BaseService;
  10. use App\Models\Admin;
  11. use App\Models\Menu;
  12. use App\Models\Region;
  13. use App\Models\User;
  14. class RegionService extends BaseService
  15. {
  16. public function index($data)
  17. {
  18. }
  19. public function store(array $data)
  20. {
  21. }
  22. public function detail($id)
  23. {
  24. }
  25. public function update(array $data)
  26. {
  27. }
  28. public function all()
  29. {
  30. $list = Region::query()->where('depth', 1)->where('isUse', 1)
  31. ->with(['children.children'])
  32. ->get()
  33. ->toArray();
  34. return $this->apiSuccess('', [
  35. 'list' => $list
  36. ]);
  37. }
  38. }