@props([ 'required' => false, 'existingUrl' => null, 'label' => 'Photo', ]) @php $retained = old('photo_data'); $preview = $retained ?: $existingUrl; $hasPreview = filled($preview); $inputId = $attributes->get('id') ?: 'photo_upload'; @endphp
{{ $label }} @if ($required)*@endif @unless ($hasPreview) Upload a clear front-facing photo (JPG, PNG or WEBP, max 2 MB). You will crop the headshot next. @endunless @error('photo'){{ $message }}@enderror @error('photo_data'){{ $message }}@enderror
@once @include('partials.photo-crop-modal') @push('scripts') @endpush @endonce