Sfoglia il codice sorgente

Merge branch 'develop'

wzq 5 anni fa
parent
commit
4d2e991d56
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      app/Repositories/BannerRepository.php

+ 3 - 0
app/Repositories/BannerRepository.php

@@ -1,6 +1,8 @@
 <?php
 namespace App\Repositories;
 use App\Models\Banner;
+use Illuminate\Support\Facades\DB;
+
 /**
  * Created by PhpStorm.
  * User: durong
@@ -25,6 +27,7 @@ class BannerRepository
             ->select('image', 'type', 'link_content_id')
             ->where($where)
             ->whereIn('id', $ids)
+            ->orderByRaw(DB::raw("FIELD(id,{$ids})"))
             ->get();
     }