feat(tenant): share website type favicon attachment
This commit is contained in:
@@ -36,6 +36,7 @@ class WebsiteTypeSeeder extends Seeder
|
||||
...self::PRESENTATION,
|
||||
'site_logo' => $this->onTicketLogo(),
|
||||
'footer_logo' => $this->onTicketFooterLogo(),
|
||||
'favicon' => $this->onTicketFavicon(),
|
||||
],
|
||||
);
|
||||
|
||||
@@ -70,6 +71,7 @@ class WebsiteTypeSeeder extends Seeder
|
||||
...self::PRESENTATION,
|
||||
'site_logo' => $this->onTicketLogo(),
|
||||
'footer_logo' => $this->onTicketFooterLogo(),
|
||||
'favicon' => $shopIt->favicon()->firstOrFail()->key,
|
||||
],
|
||||
);
|
||||
|
||||
@@ -175,4 +177,21 @@ class WebsiteTypeSeeder extends Seeder
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
private function onTicketFavicon(): UploadedFile
|
||||
{
|
||||
$path = public_path('images/website_types/onticket_favicon.svg');
|
||||
|
||||
if (! file_exists($path)) {
|
||||
throw new RuntimeException("OnTicket favicon not found at path: {$path}");
|
||||
}
|
||||
|
||||
return new UploadedFile(
|
||||
$path,
|
||||
'onticket_favicon.svg',
|
||||
'image/svg+xml',
|
||||
null,
|
||||
true,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user