إضافة لهذه المشكلة
عند عمل update للصورة تتغير القيم في ال index لكن عند فتح modal عرض الصورة تجد أن قيمة الصورة القديمة لاتزال موجودة في ال modal
وبد إضافة الصورة الجديدة
وهذا show_image.blade.php
<div class="modal fade" id="image_modal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
aria-labelledby="image_modal" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content modal-content-maps-images">
<div class="modal-header">
<h4 class="modal-title" id="delete_header">عرض المحتوى</h4>
<i type="reset" data-bs-dismiss="modal" aria-label="Close"
class="las las la-times text-danger scale5 cancel-modal"></i>
</div>
<div class="modal-body p-0">
<div style="overflow: auto; height: 500px;">
<embed id="image_src" width="100%" style="min-height: 500px; object-fit: contain;"/>
</div>
</div>
</div>
</div>
</div>
وهذا show_image.js
$(document).on("click", ".show-image-modal", function () {
if ($(this).data('type_media') === "video") {
$("#video_src").attr("src", $(this).data('video_url'));
$("#image_src").hide();
$("#view_media_card_footer").show();
} else {
$("#view_media_card_footer").hide();
$("#image_src").show();
$("#image_src").attr("src", $(this).data('image_url'));
}
$("#image_modal").modal("show");
});
وهذا row.blade.php الذي يفتح ال modal
<td>
<button type="button" value="" data-title="المسكن"data-image_url="{{ Storage::url($hotel->contract) }}"
class="show-image-modal dropdown-item" style="padding: 0;height: 33px;">
<i class="mdi mdi-file-document-outline" style="font-size: 25px; color: rgb(92, 88, 88);"></i>
</button>
</td>