@php use App\Services\CompanyEmailDetails; // Get company details using global helper function $companyDetails = CompanyEmailDetails::getCompanyEmailDetails(); // 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']; @endphp {{ $subject }}
@if (!empty($logoPath) && file_exists(public_path($logoPath))) Logo @else

{{ $companyName }}

@endif
Hello,

{{ $employee->first_name ?? '' }} {{ $employee->last_name ?? '' }}

📄 Your Payslip for {{ date('F Y', mktime(0, 0, 0, $payroll->pay_month, 1, $payroll->pay_year)) }}

💼 Payroll Period

Month: {{ date('F', mktime(0, 0, 0, $payroll->pay_month, 1)) }}

Year: {{ $payroll->pay_year }}

💰 Salary Summary

Basic Salary: ${{ number_format($payroll->basic_salary, 2) }}
Working Hours: {{ round($payroll->working_hours / 60, 2) }} hours
Hours Worked: {{ round($payroll->hours_spent / 60, 2) }} hours
@if (isset($payroll->overtime_hours) && $payroll->overtime_hours > 0)
Overtime Hours: {{ round($payroll->overtime_hours / 60, 2) }} hours
@endif
Net Salary: ${{ number_format($payroll->calculated_salary, 2) }}
@if(isset($payroll->pdf_path) && $payroll->pdf_path)

📎 Attachment: Your detailed payslip PDF is attached to this email.

🔗 View Payslip PDF Online

Please save this document for your records.

@endif