49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Notifications\Customer;
|
|
|
|
use App\Models\Settings;
|
|
use Illuminate\Notifications\Notification;
|
|
use Illuminate\Notifications\Messages\MailMessage;
|
|
|
|
class DestroyedCustomer extends Notification
|
|
{
|
|
/**
|
|
* Get the notification's delivery channels.
|
|
*
|
|
* @param object $notifiable
|
|
* @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.
|
|
*
|
|
* @param object $notifiable
|
|
* @return \Illuminate\Notifications\Messages\MailMessage
|
|
* @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass
|
|
*/
|
|
public function toMail(object $notifiable): MailMessage
|
|
{
|
|
// phpcs:enable
|
|
/** @var \App\Models\Settings */
|
|
$settings = app(Settings::class);
|
|
|
|
/** @var \App\Models\Customer $notifiable */
|
|
|
|
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]
|
|
));
|
|
}
|
|
}
|