@php $names = explode(' ', $item->contact_name); $columns = [ 'customer_id' => 'integer|min:0|nullable|exists:customers,id', 'is_company' => 'boolean|required|default:0', 'company_name' => 'string|max:255|nullable', 'tax_number' => 'string|max:255|nullable', //'customer_name' => 'string|max:255|nullable', 'last_name' => 'string|max:255|required|default:'.($item?->customer?->last_name ?? ($names[0] ?? '')), 'first_name' => 'string|max:255|required|default:'.($item?->cistomer?->first_name ?? ($names[1] ?? '')), 'customer_phone' => 'string|max:255|required', 'customer_email' => 'string|max:255|nullable', //'contact_name' => 'string|max:255|required', //'contact_phone' => 'string|max:255|required', 'store_customer' => 'boolean|required', 'update_customer' => 'boolean|required', ]; @endphp @include('admin.form.index') @push('scripts') @endpush