@php use App\Services\CompanyEmailDetails; // Ensure customer_id is available $customer_id = $customer_id ?? null; $companyDetails = CompanyEmailDetails::getCompanyEmailDetails($customer_id); // Extract variables for easier use in template $logoPath = $companyDetails['logoPath']; $companyName = $companyDetails['companyName']; $companyAddress = $companyDetails['companyAddress']; $companyCity = $companyDetails['companyCity']; $companyState = $companyDetails['companyState']; $companyPostCode = $companyDetails['companyPostCode']; $companyCountry = $companyDetails['companyCountry']; $companyPhone = $companyDetails['companyPhone']; $companyEmail = $companyDetails['companyEmail']; // Format full address $fullAddress = $companyAddress; if (!empty($companyCity)) { $fullAddress .= ', ' . $companyCity; } if (!empty($companyState)) { $fullAddress .= ', ' . $companyState; } if (!empty($companyPostCode)) { $fullAddress .= ' ' . $companyPostCode; } if (!empty($companyCountry)) { $fullAddress .= ', ' . $companyCountry; } @endphp {{ $subject }} @php \Illuminate\Support\Facades\Log::info('OTP Email Template: Before including style partial', [ 'customer_id' => $customer_id ?? 'NULL', 'email' => $email ?? 'NULL', 'template_path' => 'Emails.otp-email' ]); // Check if the partial file exists $stylePartialPath = resource_path('views/Emails/partial/style.blade.php'); $stylePartialExists = file_exists($stylePartialPath); \Illuminate\Support\Facades\Log::info('OTP Email Template: Style partial file check', [ 'path' => $stylePartialPath, 'exists' => $stylePartialExists, 'readable' => $stylePartialExists ? is_readable($stylePartialPath) : false ]); @endphp @include('Emails.partial.style', ['customer_id' => $customer_id]) @php \Illuminate\Support\Facades\Log::info('OTP Email Template: After including style partial'); @endphp
@include('Emails.partial.header', ['logoPath' => $logoPath])
@include('Emails.partial.customer-footer', [ 'logoPath' => $logoPath, 'fullAddress' => $fullAddress, 'companyPhone' => $companyPhone, 'companyEmail' => $companyEmail ])
@include('Emails.partial.admin-footer')