You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
582 B
PHTML

@extends('layouts.app')
@push('scripts')
<script type="text/javascript">
var gallery = [];
@if($data && $data->assets)
@foreach($data->assets as $i => $row)
var item = {
'src': "{{ route('image', [$row->asset->uid]) }}",
'thumb': "{{ route('image.thumbnail.rate', ['h80', $row->asset->uid]) }}",
'caption': "{{ $data->subject }}",
};
gallery.push(item);
@endforeach
@endif
Fancybox.show(gallery, {
// Your options go here
});
</script>
@endpush