refactor
This commit is contained in:
30
app/Notifications/TransactionalEmails/Test.php
Normal file
30
app/Notifications/TransactionalEmails/Test.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications\TransactionalEmails;
|
||||
|
||||
use App\Notifications\Channels\EmailChannel;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
class Test extends Notification implements ShouldQueue
|
||||
{
|
||||
use Queueable;
|
||||
|
||||
public function __construct(public string $emails)
|
||||
{}
|
||||
|
||||
public function via(): array
|
||||
{
|
||||
return [EmailChannel::class];
|
||||
}
|
||||
|
||||
public function toMail(): MailMessage
|
||||
{
|
||||
$mail = new MailMessage();
|
||||
$mail->subject('Test Notification');
|
||||
$mail->view('emails.test');
|
||||
return $mail;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user