feat: implement Attachment domain for file storage and integrate into Tenant service for logo management
This commit is contained in:
@@ -55,14 +55,6 @@ class TenantService
|
||||
/** @var Tenant $tenant */
|
||||
$tenant = Tenant::query()->create($data);
|
||||
|
||||
if ($headerAttachmentId) {
|
||||
$tenant->attachments()->attach($headerAttachmentId);
|
||||
}
|
||||
|
||||
if ($footerAttachmentId) {
|
||||
$tenant->attachments()->attach($footerAttachmentId);
|
||||
}
|
||||
|
||||
return $tenant;
|
||||
});
|
||||
}
|
||||
@@ -94,7 +86,6 @@ class TenantService
|
||||
|
||||
if ($attachment) {
|
||||
$tenant->header_logo_id = $attachment->id;
|
||||
$tenant->attachments()->attach($attachment->id);
|
||||
} else {
|
||||
$tenant->header_logo_id = null;
|
||||
}
|
||||
@@ -111,7 +102,6 @@ class TenantService
|
||||
|
||||
if ($attachment) {
|
||||
$tenant->footer_logo_id = $attachment->id;
|
||||
$tenant->attachments()->attach($attachment->id);
|
||||
} else {
|
||||
$tenant->footer_logo_id = null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user