@php use App\General\SettingsClass; use Illuminate\Support\Facades\DB; use App\Models\User; $logoPath = null; $companyName = env('APP_NAME', 'WMS'); $companyAddress = ''; $companyCity = ''; $companyState = ''; $companyPostCode = ''; $companyCountry = ''; $companyPhone = 'Contact Information'; $companyEmail = env('EMAIL_ADDRESS', 'support@example.com'); // Get admin settings data $admin = User::where('user_type', config('constants.user_types.admin'))->first(); if ($admin) { $settings = DB::table('adminsettings') ->where('customer_id', $admin->id) ->get(); // Transform into key-value pairs for easier access $settingsData = []; foreach ($settings as $setting) { $settingsData[$setting->key] = $setting->value; } // Get logo if (isset($settingsData['brand_logo_dark'])) { $logoPath = $settingsData['brand_logo_dark']; } // Get company information if (isset($settingsData['company_company_name'])) { $companyName = $settingsData['company_company_name']; } if (isset($settingsData['company_company_address'])) { $companyAddress = $settingsData['company_company_address']; } if (isset($settingsData['company_company_city'])) { $companyCity = $settingsData['company_company_city']; } if (isset($settingsData['company_company_state'])) { $companyState = $settingsData['company_company_state']; } if (isset($settingsData['company_company_post_code'])) { $companyPostCode = $settingsData['company_company_post_code']; } if (isset($settingsData['company_company_country'])) { $companyCountry = $settingsData['company_company_country']; } if (isset($settingsData['company_company_telephone'])) { $companyPhone = $settingsData['company_company_telephone']; } if (isset($settingsData['company_company_email'])) { $companyEmail = $settingsData['company_company_email']; } } // 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; } // Define color theme for this email $themeColor = '#3B82F6'; // Blue $themeBackground = 'linear-gradient(135deg, #DBEAFE 0%, #93C5FD 100%)'; $themeIcon = '🔑'; // Helper function to safely get settings @endphp
Welcome to {{ $companyName }}! Your account has been set up, and you can now access the system.
Email: {{ $email }}
Password: {{ $password }}
We're excited to have you onboard! You can now log in to access all the features available to your account.
For security reasons, we recommend changing your password after logging in for the first time.
Log In NowIf you have any questions or need assistance using the system, please contact your administrator or our support team.
Thank you,
{{ $companyName }} Team