47 lines
1.2 KiB
PHP
47 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Notifications\Customer;
|
|
|
|
use App\Models\Settings;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
class DestroyedCustomer extends Notification
|
|
{
|
|
/**
|
|
* Get the notification's delivery channels.
|
|
*
|
|
* @return array<int, string>
|
|
*
|
|
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
|
|
*/
|
|
public function via(object $notifiable): array
|
|
{
|
|
// phpcs:enable
|
|
return ['mail'];
|
|
}
|
|
|
|
/**
|
|
* Build the mail representation of the notification.
|
|
*
|
|
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
|
|
*/
|
|
public function toMail(object $notifiable): MailMessage
|
|
{
|
|
// phpcs:enable
|
|
/** @var Settings */
|
|
$settings = resolve(Settings::class);
|
|
|
|
return new MailMessage()
|
|
->subject(trans('front.mails.subjects.destroyed_customer', [
|
|
'site_name' => $settings->name,
|
|
]))
|
|
->greeting('front.mails.greetings.without_name')
|
|
->line(trans(
|
|
'front.mails.contents.destroyed_customer',
|
|
['site_name' => $settings->name]
|
|
));
|
|
}
|
|
}
|