visavi/rotor

View on GitHub
resources/views/widgets/_photos.blade.php

Summary

Maintainability
A
0 mins
Test Coverage
@if ($photos->isNotEmpty())
    <div class="section-body">
    @foreach ($photos as $photo)
        @php
            $file = $photo->files()->first();
        @endphp

        @if ($file)
            <a href="/photos/{{ $photo->id }}">{{ resizeImage($file->hash, ['alt' => check($photo->title), 'class' => 'rounded', 'style' => 'width: 100px;']) }}</a>
        @endif
    @endforeach
    </div>
@endif