@extends('core/base::layouts.master') @php $fields = [ ['key' => 'name', 'label' => trans('plugins/contact::contact.forms.name') , 'type' => 'text'], ['key' => 'email', 'label' => trans('plugins/contact::contact.forms.email'), 'type' => 'text'], ['key' => 'phone', 'label' => trans('plugins/contact::contact.forms.phone'), 'type' => 'text'], ['key' => 'commercial_registration_number', 'label' => trans('plugins/contact::contact.forms.commercial_registration_number'), 'type' => 'text'], ['key' => 'unified_number', 'label' => trans('plugins/contact::contact.forms.unified_number'), 'type' => 'text'], ['key' => 'tax_number', 'label' => trans('plugins/contact::contact.forms.tax_number'), 'type' => 'text'], ['key' => 'zakat_number', 'label' => trans('plugins/contact::contact.forms.zakat_number'), 'type' => 'text'], ['key' => 'classification_certificate', 'label' => trans('plugins/contact::contact.forms.classification_certificate'), 'type' => 'file'], ['key' => 'baladi_license', 'label' => trans('plugins/contact::contact.forms.baladi_license'), 'type' => 'file'], ['key' => 'development_certificate', 'label' => trans('plugins/contact::contact.forms.name'), 'type' => 'file'], ['key' => 'real_estate_contributions_certificate', 'label' => trans('plugins/contact::contact.forms.development_certificate'), 'type' => 'file'], ['key' => 'exceptional_sale_certificate', 'label' => trans('plugins/contact::contact.forms.exceptional_sale_certificate'), 'type' => 'file'], ['key' => 'unified_electronic_precedence', 'label' => trans('plugins/contact::contact.forms.unified_electronic_precedence'), 'type' => 'text'], ['key' => 'owner_id_image', 'label' => trans('plugins/contact::contact.forms.owner_id_image'), 'type' => 'file'], ['key' => 'created_at', 'label' => trans('plugins/contact::contact.forms.send_date'), 'type' => 'date'], ]; @endphp @section('content')

{{ trans('plugins/contact::contact.forms.title') }}

@foreach($fields as $field) @endforeach @forelse($contacts as $contact) @foreach($fields as $field) @php $value = $contact->custom_fields[$field['key']] ?? $contact->{$field['key']} ?? ''; @endphp @endforeach @empty @endforelse
{{ $field['label'] }}
@if($field['type'] === 'file') @if(is_string($value) && preg_match('/\.(mp4|webm|ogg)$/i', $value)) @elseif(is_string($value) && $value) {{ trans('plugins/contact::contact.forms.download') }} @else - @endif @elseif ($field['type']==='date') {{ $value->format('Y-m-d H:i') ?: '-' }} @else {{ $value ?: '-' }} @endif
{{ trans('plugins/contact::contact.forms.empty') }}
@endsection