34 lines
941 B
PHP
34 lines
941 B
PHP
@if ($images)
|
|
<div class="row" id="uploader-mini-gallery">
|
|
@foreach($images as $image)
|
|
<figure class="mr-2">
|
|
<img src="{{ $image['url'] }}" class="img-thumbnail img-caption" style="max-height:92px;">
|
|
<figcaption class="text-center pt-2">
|
|
<button type="button" class="btn btn-xs btn-outline-secondary">
|
|
<i class="fas fa-expand-alt" data-id="{{ $image['id'] }}"></i>
|
|
</button>
|
|
<button type="button" class="btn btn-xs btn-outline-danger">
|
|
<i class="fas fa-trash" data-id="{{ $image['id'] }}"></i>
|
|
</button>
|
|
</figcaption>
|
|
</figure>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
|
|
@push('js')
|
|
<script>
|
|
$('#uploader-mini-gallery .fa-trash').click(function() {
|
|
id = $(this).data('id');
|
|
console.log(id);
|
|
$.ajax({
|
|
type: 'DELETE',
|
|
url: {{ route('Botanic.Admin.Varieties.deleteImage') }},
|
|
data: {id: id},
|
|
success: function(data) {
|
|
source = data;
|
|
}
|
|
});
|
|
})
|
|
</script>
|
|
@endpush |