@extends('admin.layouts.admin') @section('content')
@if($action == 'Edit')
@else @endif @csrf
@if(isset($record->id)) @php $id=$record->id @endphp @else @php $id=0; @endphp @endif
{{ $title }}
@if(isset($record->image)) @php $image=$record->image @endphp @php $imageUrl=asset(Storage::url('staff/'.$record->image)) @endphp @elseif(old('image')) @php $image=old('image'); @endphp $imageUrl="" @else @php $image=''; $imageUrl="" @endphp @endif
@if(isset($record->first_name)) @php $first_name=$record->first_name @endphp @elseif(old('first_name')) @php $first_name=old('first_name'); @endphp @else @php $first_name=''; @endphp @endif
@if(isset($record->last_name)) @php $last_name=$record->last_name @endphp @elseif(old('last_name')) @php $last_name=old('last_name'); @endphp @else @php $last_name=''; @endphp @endif
@if(isset($record->email)) @php $email=$record->email @endphp @elseif(old('email')) @php $email=old('email'); @endphp @else @php $email=''; @endphp @endif
@if(isset($record->phone)) @php $phone=$record->phone @endphp @elseif(old('phone')) @php $phone=old('phone'); @endphp @else @php $phone=''; @endphp @endif
@if(isset($record->zipcode)) @php $zipcode=$record->zipcode @endphp @elseif(old('zipcode')) @php $zipcode=old('zipcode'); @endphp @else @php $zipcode=''; @endphp @endif
@if(isset($record->address)) @php $address=$record->address @endphp @elseif(old('address')) @php $address=old('address'); @endphp @else @php $address=''; @endphp @endif
@if(isset($record->country_id)) @php $country_id=$record->country_id @endphp @elseif(old('country_id')) @php $country_id=old('country_id'); @endphp @else @php $country_id=0; @endphp @endif

@if(isset($record->services)) @php $service_ids=$record->services->pluck('service_id')->toArray() @endphp @elseif(old('services')) @php $service_ids=old('services'); @endphp @else @php $service_ids=[]; @endphp @endif @foreach($services as $service)
id,$service_ids) ? 'checked' : '' !!}>
@endforeach
@if(isset($record->active)) @php $active=$record->active @endphp @elseif(old('active')) @php $active=old('active'); @endphp @else @php $active=1; @endphp @endif
@endsection @push('scripts') @endpush