Import notification file and updated other file..

This commit is contained in:
Cüneyt Şentürk
2021-06-19 22:30:14 +03:00
parent 4687185f4a
commit 5c5b890942
12 changed files with 182 additions and 27 deletions

View File

@ -38,7 +38,7 @@ class ImportFailed extends Notification implements ShouldQueue
*/
public function via($notifiable)
{
return ['mail'];
return ['mail', 'database'];
}
/**
@ -50,8 +50,8 @@ class ImportFailed extends Notification implements ShouldQueue
public function toMail($notifiable)
{
$message = (new MailMessage)
->subject(trans('notifications.import.failed.subject'))
->line(trans('notifications.import.failed.description'));
->subject(trans('notifications.import.failed.subject'))
->line(trans('notifications.import.failed.description'));
foreach ($this->errors as $error) {
$message->line($error);
@ -59,4 +59,17 @@ class ImportFailed extends Notification implements ShouldQueue
return $message;
}
/**
* Get the array representation of the notification.
*
* @param mixed $notifiable
* @return array
*/
public function toArray($notifiable)
{
return [
'errors' => $this->errors,
];
}
}