|
@@ -257,7 +257,10 @@ class TicketJob implements ShouldQueue
|
|
|
$templateProcessor = new TemplateProcessor(base_path() . $template);
|
|
|
foreach ($data as $k => $v){
|
|
|
if($k == 'avatar'){
|
|
|
- $templateProcessor->setImageValue('avatar',['path' => base_path() . '/public/' . $v, 'width' => 200, 'height' => 150]);
|
|
|
+ if(file_exists(base_path() . '/public/' . $v)){
|
|
|
+ $templateProcessor->setImageValue('avatar',['path' => base_path() . '/public/' . $v, 'width' => 200, 'height' => 150]);
|
|
|
+ }
|
|
|
+
|
|
|
}else{
|
|
|
$templateProcessor->setValue($k, $v);
|
|
|
}
|