1
Primary Testator (Will Writer)
Choose agent from dropdown, then manually fill details below
Select agent from dropdown, then manually enter their details in the form fields.
@php
$testatorDetails = [];
$secondaryDetails = [];
$executorDetails = [];
$guardianDetails = [];
// Debug: Check raw data
$rawTestatorDetails = $will->testator_details;
if ($will->testator_details !== null) {
// Handle both array (from Laravel casts) and JSON string
$decodedData = is_array($will->testator_details)
? $will->testator_details
: (json_decode($will->testator_details, true) ?? []);
$testatorDetails = $decodedData['primary'] ?? [];
$secondaryDetails = $decodedData['secondary'] ?? [];
$executorDetails = $decodedData['executor'] ?? [];
$guardianDetails = $decodedData['guardian'] ?? [];
}
@endphp
@php
// Extract special instructions text from JSON if it exists
$specialInstructions = '';
if ($will->instructions) {
$instrData = is_array($will->instructions)
? $will->instructions
: json_decode($will->instructions, true);
if (is_array($instrData) && isset($instrData['special_instructions'])) {
$specialInstructions = $instrData['special_instructions'];
}
}
@endphp