@extends('admin.layouts.master') @section('title', 'Edit Customer') @section('content')
Edit Customer
Back
@if(session('message'))
{{ session('message') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
@csrf
{{-- Name --}}
@error('name')
{{ $message }}
@enderror
{{-- user Name --}}
@error('name')
{{ $message }}
@enderror
{{-- Email --}}
@error('email')
{{ $message }}
@enderror
{{-- Phone --}}
@error('phone')
{{ $message }}
@enderror
{{-- Password --}}
@error('password')
{{ $message }}
@enderror
{{-- Address --}}
@error('address')
{{ $message }}
@enderror
{{-- Profile Photo --}} {{-- ID Front Copy --}}
@error('id_front')
{{ $message }}
@enderror
@if($customer->id_copy) @php $idFront = json_decode($customer->id_copy); @endphp @if($idFront && isset($idFront->front)) @php $ext = pathinfo($idFront->front, PATHINFO_EXTENSION); @endphp @if(in_array(strtolower($ext), ['jpg','jpeg','png','gif'])) ID Front Copy @elseif(strtolower($ext) === 'pdf') @endif Download @else @endif @else @endif
{{-- ID Back Copy --}}
@error('id_back')
{{ $message }}
@enderror
@if($customer->id_copy) @php $idBack = json_decode($customer->id_copy); @endphp @if($idBack && isset($idBack->back)) @php $ext = pathinfo($idBack->back, PATHINFO_EXTENSION); @endphp @if(in_array(strtolower($ext), ['jpg','jpeg','png','gif'])) ID Back Copy @elseif(strtolower($ext) === 'pdf') @endif Download @else @endif @else @endif
{{-- Profile Photo --}}
@error('profile_photo')
{{ $message }}
@enderror
@if($customer->profile_photo) @php $profilePhoto = json_decode($customer->profile_photo); @endphp @if($profilePhoto && isset($profilePhoto->url)) Profile Photo Download @else @endif @else @endif
{{-- Passport Copy --}} {{-- Passport Copy --}}
@error('passport_copy')
{{ $message }}
@enderror {{-- Image preview --}}
@if($customer->passport_copy) @php $passport = json_decode($customer->passport_copy); @endphp @if($passport && isset($passport->url)) @php $ext = pathinfo($passport->url, PATHINFO_EXTENSION); @endphp @if(in_array(strtolower($ext), ['jpg','jpeg','png','gif'])) Passport Copy @elseif(strtolower($ext) === 'pdf') @endif Download @else @endif @else @endif
{{-- Passport Uploaded Date --}}
@error('passport_uploaded_date')
{{ $message }}
@enderror
{{-- Birth Date --}}
@error('birth_date')
{{ $message }}
@enderror
@endsection @push('js') @endpush