@php $mode = $mode ?? 'create'; $isEdit = $mode === 'edit'; $action = $isEdit ? route('admin.services.update', $service) : route('admin.services.store'); $selectedStaffIds = collect(old('staff_profile_ids', $selectedStaffIds ?? []))->map(fn ($id) => (int) $id)->all(); @endphp
@csrf @if ($isEdit) @method('PUT') @endif
@error('staff_profile_ids')

{{ $message }}

@enderror @if ($staffProfiles->isNotEmpty())
@foreach ($staffProfiles as $staff) @endforeach
@else
Add staff profiles before assigning staff to services.
@endif
@if ($service->image_url) {{ $service->name }} image @else

Upload service image

PNG or JPG, 1200 x 800 recommended

@endif @error('image')

{{ $message }}

@enderror

{{ old('name', $service->name ?: 'Hair Cut & Style') }}

{{ old('category', $service->category ?: 'Hair Services') }}

{{ old('duration_minutes', $service->duration_minutes ?: 60) }} minutes ${{ number_format((float) old('price', $service->price ?: 65), 2) }}
{{ $isEdit ? 'Update Service' : 'Save Service' }} Cancel