SettingController.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace App\Http\Controllers\V1;
  3. use App\Models\Banner;
  4. use App\Models\NavBar;
  5. use App\Models\RechargeCombo;
  6. use App\Models\Tabbar;
  7. class SettingController extends Controller
  8. {
  9. /**
  10. * 底部导航
  11. */
  12. public function tabBar()
  13. {
  14. $all = Tabbar::select(['name','icon','type'])
  15. ->where('status',1)
  16. ->orderByDesc('sort')
  17. ->get();
  18. return $this->success($all);
  19. }
  20. /**
  21. * 首页顶部分类
  22. */
  23. public function navBar()
  24. {
  25. $all = NavBar::select(['name','icon','type'])
  26. ->where('status',1)
  27. ->orderByDesc('sort')
  28. ->get();
  29. return $this->success($all);
  30. }
  31. /**
  32. * 首页顶部分类
  33. */
  34. public function banner()
  35. {
  36. $all = Banner::select(['name as title','image'])
  37. ->where('status',1)
  38. ->orderByDesc('sort')
  39. ->get();
  40. return $this->success($all);
  41. }
  42. public function rechargeCombo()
  43. {
  44. $lists = RechargeCombo::all();
  45. return $this->success($lists);
  46. }
  47. }