public function getGallery($ids)
    {
        if (empty($ids) || $ids === '{}' || $ids === '[]') return null;

        $ids = $this->parseGalleryIds($ids);

        $placeholders = implode(',', array_fill(0, count($ids), '?'));

        $imageModel = $this->getImageModelName();

        $gallery = call_user_func_array([$imageModel, 'whereIn'], ['id', $ids]);
        $gallery = $gallery
            ->orderByRaw('field(id,' . $placeholders . ')', $ids)
            ->get();

        return (count($gallery) > 0) ? $gallery : null;
    }