@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; } // Set defaults for variables that might not be provided if (!isset($subject)) { $subject = 'New Plan Assignment'; } // Status configuration for plan assignment $status_config = [ 'status_text' => 'Plan Assigned Successfully', 'color' => '#22C55E', // Green 'background' => 'linear-gradient(135deg, #22C55E 0%, #16A34A 100%)', 'icon' => '🎯', 'message' => 'A new plan has been successfully assigned to your account.', ]; @endphp
A new plan has been successfully assigned to your account.
Hi {{ $name ?? 'Valued User' }},
We are pleased to inform you that a new plan has been assigned to your account. Below are the details of your new plan.
| Plan Name | {{ $plan_name ?? 'N/A' }} |
| Price | @if(isset($is_free_plan) && $is_free_plan) Free @else {{ $price ?? '0' }} {{ $currency ?? 'AUD' }} @endif |
| Expiry Date | {{ $expiry_date ?? 'N/A' }} |
You can now access all the features and benefits included with this plan. Please log in to your account to start using the services.
Login to Your Account
If you have any questions or need assistance with your new plan, please contact our support team.
Thank you,
{{ $companyName }} Team