@php ($field_prefix = sprintf('photo[%d]', $photo->id))

{{-- Photo editing tasks - these are hooked up using Javascript in admin/show_album --}}
@php($validation_field_name = ('photo.' . $photo->id . '.name'))
@if ($errors->has($validation_field_name)) {{ $errors->first($validation_field_name) }} @endif