Files
portal-api/database/seeders/TemplateSeeder.php
T
2025-07-24 16:18:27 +07:00

62 lines
11 KiB
PHP
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace Database\Seeders;
use App\Models\Template;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
class TemplateSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$Templates = [
[
'name' => 'Client Signup Verify Email',
'subject' => 'Thông tin kích hoạt tài khoản khách hàng',
'message' => '<table cellpadding=0 cellspacing=0 role=presentation style=width:100%;font-family:Montserrat,-apple-system><tr><td style=background-color:#eceff1;font-family:Montserrat,-apple-system,sans-serif align=center><table cellpadding=0 cellspacing=0 role=presentation style=width:600px><tr><td align=center><table cellpadding=0 cellspacing=0 role=presentation style=width:100%><tr><td style=padding:48px;text-align:center> <tr style=background-color:#fff><td style="text-align:center;padding:20px;border-bottom:.5px solid #ececec"><img alt={$company_name} src={$company_logo} style=max-height:100px><tr><td style=border-radius:4px;background-color:#fff;padding:48px;text-align:left;font-family:Montserrat,-apple-system,sans-serif;font-size:16px;line-height:24px;color:#626262><p style=margin-bottom:10px;font-size:20px;font-weight:600>Kính chào Quý khách<p>Cảm ơn bạn đã đăng ký tài khoản tại {$company_name}! Để hoàn tất quá trình đăng ký, vui lòng truy cập đường dẫn dưới đây để xác minh tài khoản của bạn.<table cellpadding=0 cellspacing=0 role=presentation><tr><td style=border-radius:4px;background-color:#f16723;text-align:center;font-family:Montserrat,-apple-system,sans-serif;padding-left:48px;padding-right:48px><a href={$link_verify} style="font-family:sans-serif;display:block;font-size:16px;font-weight:600;line-height:100%;color:#fff;text-decoration:none;padding:16px 24px 16px 24px">XÁC NHẬN TÀI KHOẢN</a></table><p>Hoặc bạn có thể coppy đường dẫn sau đưa lên trình duyệt để active tài khoản:</p><a href={$link_verify}>{$link_verify}</a><p>Sau khi xác minh, bạn sẽ có thể sử dụng tài khoản của mình và truy cập các dịch vụ của chúng tôi.<p>Nếu bạn có bất kỳ câu hỏi nào, vui lòng liên hệ với chúng tôi để được hỗ trợ.<p>Lưu ý:<p style=text-indent:30px> <ul><li>Đây là tin nhắn tự động. Vui lòng không trả lời tin nhắn này!</ul><p> </table><tr><td style=padding:48px;text-align:center> </table></table>',
'type_id' => 0,
'status' => 1
],
[
'name' => 'Server information',
'subject' => 'Thông tin truy cập VPS {$os_name}',
'message' => '<table cellpadding=0 cellspacing=0 role=presentation style=width:100%;font-family:Montserrat,-apple-system><tr><td style=background-color:#eceff1;font-family:Montserrat,-apple-system,sans-serif align=center><table cellpadding=0 cellspacing=0 role=presentation style=width:600px><tr><td align=center><table cellpadding=0 cellspacing=0 role=presentation style=width:100%><tr><td style=padding:48px;text-align:center> <tr style=background-color:#fff><td style="text-align:center;padding:20px;border-bottom:.5px solid #ececec"><img alt={$company_name} class="CToWUd a6T"data-bit=iit src={$company_logo} style=max-height:100px tabindex=0><tr><td style=border-radius:4px;background-color:#fff;padding:48px;text-align:left;font-family:Montserrat,-apple-system,sans-serif;font-size:16px;line-height:24px;color:#626262><p style=margin-bottom:10px>Kính gửi Quý khách<p>Cảm ơn Quý khách đã tin tưởng và sử dụng dịch vụ của {$company_name}, Cloud VPS của Quý khách đã được khởi tạo thành công, Quý khách vui lòng sử dụng thông  tin sau vào quản lý.<p><strong>Thông tin gói VPS:</strong><ul><li><strong>{$product_name}</strong><li>Chu kỳ thanh toán: <strong>{$product_billing}</strong><li>Giá: <strong>{$product_price} đ</strong></ul><p><strong>Thông tin truy cập VPS:</strong><ul><li><strong>IP:</strong> {$service_host}<li><strong>User:</strong> {$service_username}<li><strong>Port:</strong> {$service_port}<li><strong>Password:</strong> {$service_password}<li><strong>Hệ điều hành:</strong> {$os_name}<li><strong>Ngày hết hạn:</strong> {$service_due_exp}</ul><p>Nếu bạn có bất kỳ câu hỏi nào, vui lòng liên hệ với chúng tôi để được hỗ trợ.<p>Trân trọng!</table><tr><td style=padding:48px;text-align:center> </table></table>',
'type_id' => 4,
'status' => 1
],
[
'name' => 'Hosting Information',
'subject' => 'Thông tin truy cập {$product_name}',
'message' => '<table cellpadding=0 cellspacing=0 role=presentation style=width:100%;font-family:Montserrat,-apple-system><tr><td style=background-color:#eceff1;font-family:Montserrat,-apple-system,sans-serif align=center><table cellpadding=0 cellspacing=0 role=presentation style=width:600px><tr><td align=center><table cellpadding=0 cellspacing=0 role=presentation style=width:100%><tr><td style=padding:48px;text-align:center> <tr style=background-color:#fff><td style="text-align:center;padding:20px;border-bottom:.5px solid #ececec"><img alt={$company_name} class="CToWUd a6T"data-bit=iit src={$company_logo} style=max-height:100px tabindex=0><tr><td style=border-radius:4px;background-color:#fff;padding:48px;text-align:left;font-family:Montserrat,-apple-system,sans-serif;font-size:16px;line-height:24px;color:#626262><p style=margin-bottom:10px>Kính gửi Quý khách<p>Cảm ơn Quý khách đã tin tưởng và sử dụng dịch vụ của {$company_name}, Hosting của Quý khách đã được khởi tạo thành công, Quý khách vui lòng sử dụng thông  tin sau vào quản lý.<p><strong>Thông tin gói Hosting:</strong><ul><li><strong>{$product_name}</strong><li>Chu kỳ thanh toán: <strong>{$product_billing}</strong><li>Giá: <strong>{$product_price} đ</strong></ul><p><strong>Thông tin truy cập Hosting:</strong><ul><li><strong>IP:</strong> {$service_host}<li><strong>User:</strong> {$service_username}<li><strong>Password:</strong> {$service_password}<li><strong>Ngày hết hạn:</strong> {$service_due_exp}</ul><p><strong>Thông tin truy cập FTP Hosting:</strong><ul><li><strong>IP:</strong> {$service_host}<li><strong>User:</strong> {$ftp_account}<li><strong>Password:</strong> {$ftp_password}</ul><p>Cảm ơn quý khách đã sử dụng dịch vụ của {$company_name}.<p>Nếu bạn có bất kỳ câu hỏi nào, vui lòng liên hệ với chúng tôi để được hỗ trợ.<p>Trân trọng!</table><tr><td style=padding:48px;text-align:center> </table></table>',
'type_id' => 3,
'status' => 1
],
[
'name' => 'Customer Password Reset',
'subject' => 'Khôi phục mật khẩu | Password Recovery',
'message' => '<table cellpadding=0 cellspacing=0 role=presentation style=width:100%;font-family:Montserrat,-apple-system><tr><td style=background-color:#eceff1;font-family:Montserrat,-apple-system,sans-serif align=center><table cellpadding=0 cellspacing=0 role=presentation style=width:600px><tr><td align=center><table cellpadding=0 cellspacing=0 role=presentation style=width:100%><tr><td style=padding:48px;text-align:center> <tr style=background-color:#fff><td style="text-align:center;padding:20px;border-bottom:.5px solid #ececec"><img alt={$company_name} src={$company_logo} style=max-height:100px><tr><td style=border-radius:4px;background-color:#fff;padding:48px;text-align:left;font-family:Montserrat,-apple-system,sans-serif;font-size:16px;line-height:24px;color:#626262><p style=margin-bottom:10px>Kính chào Quý khách<p>Mật khẩu của quý khách đã được khôi phục thành công, vui lòng truy sử dụng mật khẩu sau đây để truy cập vào tài khoản của bạn.<table cellpadding=0 cellspacing=0 role=presentation style=width:100%;max-height:30px;overflow:hidden><tr style=text-align:center><td style=border-radius:4px;background-color:#f16723;text-align:center;font-family:Montserrat,-apple-system,sans-serif;padding-left:48px;padding-right:48px><p style=font-family:sans-serif;display:block;font-size:16px;font-weight:600;line-height:100%;color:#fff;text-decoration:none;padding:10px>{$password}</table><p>Vui lòng thay đổi mật khẩu của quý khách ngay sau khi đăng nhập.<p>Nếu bạn có bất kỳ câu hỏi nào, vui lòng liên hệ với chúng tôi để được hỗ trợ.<p>Lưu ý:<p style=text-indent:30px> <ul><li>Đây là tin nhắn tự động. Vui lòng không trả lời tin nhắn này!</ul><p> </table><tr><td style=padding:48px;text-align:center> </table></table>',
'type_id' => 0,
'status' => 1
],
[
'name' => 'Service Expiry',
'subject' => 'Thông báo dịch vụ sắp hết hạn',
'message' => '<table cellpadding=0 cellspacing=0 role=presentation style=width:100%;font-family:Montserrat,-apple-system><tr><td style=background-color:#eceff1;font-family:Montserrat,-apple-system,sans-serif align=center><table cellpadding=0 cellspacing=0 role=presentation style=width:600px><tr><td align=center><table cellpadding=0 cellspacing=0 role=presentation style=width:100%><tr><td style=padding:48px;text-align:center> <tr style=background-color:#fff><td style="text-align:center;padding:20px;border-bottom:.5px solid #ececec"><img alt={$company_name} class="CToWUd a6T"data-bit=iit src={$company_logo} style=max-height:100px tabindex=0><tr><td style=border-radius:4px;background-color:#fff;padding:48px;text-align:left;font-family:Montserrat,-apple-system,sans-serif;font-size:16px;line-height:24px;color:#626262><p style=margin-bottom:10px>Kính gửi Quý khách<p>{$company_name} xin gửi Quý khách danh sách các dịch vụ sắp hết hạn, cụ thể như sau:​​​<p><strong>Thông tin gói dịch vụ:</strong><ul><li><strong>{$product_name}</strong><li>Ngày hết hạn: <strong>{$service_due_exp}</strong><li>Thời hạn: Còn <strong>{$service_remaining} </strong>ngày</ul><p>Vui lòng gia hạn dịch vụ trước thời hạn để không ảnh hưởng dịch vụ.<p>Nếu bạn có bất kỳ câu hỏi nào, vui lòng liên hệ với chúng tôi để được hỗ trợ.<p>Trân trọng.</table><tr><td style=padding:48px;text-align:center> </table></table>',
'type_id' => 0,
'status' => 1
]
];
foreach ($Templates as $item)
{
Template::create($item);
}
}
}