@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'))
{!! Form::label($field_prefix . '[name]', trans('forms.name_label'), ['class' => 'control-label']) !!} {!! Form::text($field_prefix . '[name]', old('name', $photo->name), ['class' => 'form-control']) !!} @if ($errors->has($validation_field_name)) {{ $errors->first($validation_field_name) }} @endif
{!! Form::label($field_prefix . '[description]', trans('forms.description_label'), ['class' => 'control-label']) !!} {!! Form::textarea($field_prefix . '[description]', old('name', $photo->description), ['class' => 'form-control', 'rows' => 4]) !!}