instances added god may help
This commit is contained in:
@@ -6,7 +6,7 @@ use Dompdf\Dompdf;
|
||||
use Dompdf\Options;
|
||||
use Endroid\QrCode\QrCode;
|
||||
use Endroid\QrCode\Writer\PngWriter;
|
||||
use MintyPHP\Service\Branding\BrandingLogoService;
|
||||
use MintyPHP\Service\Branding\BrandingServicesFactory;
|
||||
use Throwable;
|
||||
use ZipArchive;
|
||||
|
||||
@@ -168,12 +168,13 @@ class UserAccessPdfService
|
||||
$path = '';
|
||||
$mime = '';
|
||||
|
||||
$logoService = (new BrandingServicesFactory())->createBrandingLogoService();
|
||||
// Prefer tenant/app branding logo first.
|
||||
if (class_exists(BrandingLogoService::class) && BrandingLogoService::hasLogo()) {
|
||||
$logoPath = BrandingLogoService::findLogoPath(128);
|
||||
if ($logoService->hasLogo()) {
|
||||
$logoPath = $logoService->findLogoPath(128);
|
||||
if ($logoPath && is_file($logoPath)) {
|
||||
$path = $logoPath;
|
||||
$mime = BrandingLogoService::detectMime($logoPath);
|
||||
$mime = $logoService->detectMime($logoPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user