mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Extract helper
This commit is contained in:
parent
6a4a5d1380
commit
e94ee48f74
|
@ -58,15 +58,9 @@ class CheckoutAssetMail extends Mailable
|
||||||
{
|
{
|
||||||
$from = new Address(config('mail.from.address'), config('mail.from.name'));
|
$from = new Address(config('mail.from.address'), config('mail.from.name'));
|
||||||
|
|
||||||
$subject = trans('mail.Asset_Checkout_Notification');
|
|
||||||
|
|
||||||
if (!$this->firstTimeSending) {
|
|
||||||
$subject = trans('mail.Asset_Checkout_Reminder_Notification');
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Envelope(
|
return new Envelope(
|
||||||
from: $from,
|
from: $from,
|
||||||
subject: $subject,
|
subject: $this->getSubject(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,4 +111,13 @@ class CheckoutAssetMail extends Mailable
|
||||||
{
|
{
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function getSubject(): string
|
||||||
|
{
|
||||||
|
if ($this->firstTimeSending) {
|
||||||
|
return trans('mail.Asset_Checkout_Notification');
|
||||||
|
}
|
||||||
|
|
||||||
|
return trans('mail.Asset_Checkout_Reminder_Notification');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue