海南旅游SAAS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
476 B

4 years ago
4 years ago
  1. <?php
  2. namespace App\Http\Controllers\Api;
  3. use App\Http\Controllers\Controller;
  4. use App\Models\Slide;
  5. use Illuminate\Support\Facades\DB;
  6. //轮播图
  7. class SlideController extends Controller
  8. {
  9. //轮播图列表
  10. public function index()
  11. {
  12. $list = Slide::where(['agent_id' => $this->agent_id, 'status' => 1])
  13. ->orderBy(DB::raw('sort ASC, id DESC'))
  14. ->limit(10)
  15. ->get(['title','picture', 'type', 'url']);
  16. return $this->success($list);
  17. }
  18. }