1 2 3 4 5 6 |
static function items_by_ids($ids){ $result = self::whereIn('id', $ids) ->orderBy(DB::raw('field(id, ' . implode(',', $ids) . ')')) ->get(); return $result; } |
Reference:
1 2 3 4 5 6 |
static function items_by_ids($ids){ $result = self::whereIn('id', $ids) ->orderBy(DB::raw('field(id, ' . implode(',', $ids) . ')')) ->get(); return $result; } |
Reference: