英文名与水印

This commit is contained in:
2026-01-19 10:49:38 +08:00
parent 4e3bbb2774
commit 4e87de9979
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ class User extends Model
/**
* 允许自动填充模型字段
*/
protected $fillable = ['id', 'union_id', 'app_id', 'name', 'avatar', 'phone', 'email', 'whatsapp', 'social', 'social_code', 'status', 'role'];
protected $fillable = ['id', 'union_id', 'app_id', 'name', 'name_en', 'avatar', 'phone', 'email', 'whatsapp', 'social', 'social_code', 'status', 'role'];
/**
* 不允许自动填充模型字段
+2 -1
View File
@@ -160,9 +160,10 @@ class MpdfDriver
$car['code'] // 拥有者密码(一定要设置)
);
$user['name_en'] = empty($user['name_en'])?$user['name']:$user['name_en'];
//设置水印
$mpdf->SetWatermarkText(
$user['name'] .' '. $contact,
$user['name_en'] ,
0.08
);
$mpdf->showWatermarkText = true;