123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php
- namespace App\Http\Controllers\V1;
- use App\Models\Banner;
- use App\Models\HomeColumn;
- use App\Models\NavBar;
- use App\Models\RechargeCombo;
- use App\Models\Tabbar;
- class SettingController extends Controller
- {
- /**
- * 底部导航
- */
- public function tabBar()
- {
- $all = Tabbar::select(['name','icon','type'])
- ->where('status',1)
- ->orderByDesc('sort')
- ->get();
- return $this->success($all);
- }
- /**
- * 首页顶部分类
- */
- public function navBar()
- {
- $all = NavBar::select(['name','icon','type'])
- ->where('status',1)
- ->orderByDesc('sort')
- ->get();
- return $this->success($all);
- }
- /**
- * 首页顶部分类
- */
- public function banner()
- {
- $all = Banner::select(['name as title','image'])
- ->where('status',1)
- ->orderByDesc('sort')
- ->get();
- return $this->success($all);
- }
- public function homeColumn()
- {
- $all = HomeColumn::select(['name','type'])
- ->where('status',1)
- ->orderByDesc('sort')
- ->get();
- return $this->success($all);
- }
- public function rechargeCombo()
- {
- $lists = RechargeCombo::all();
- return $this->success($lists);
- }
- }
|