styling notifications
This commit is contained in:
parent
9e94dd9fac
commit
c8a5127f65
@ -6,6 +6,7 @@ use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Support\HtmlString;
|
||||
|
||||
class ExportCompleted extends Notification implements ShouldQueue
|
||||
{
|
||||
@ -52,6 +53,7 @@ class ExportCompleted extends Notification implements ShouldQueue
|
||||
{
|
||||
return (new MailMessage)
|
||||
->subject(trans('notifications.export.completed.title'))
|
||||
->line(new HtmlString('<br><br>'))
|
||||
->line(trans('notifications.export.completed.description'))
|
||||
->action(trans('general.download'), $this->download_url);
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Support\HtmlString;
|
||||
|
||||
class ExportFailed extends Notification implements ShouldQueue
|
||||
{
|
||||
@ -51,8 +52,11 @@ class ExportFailed extends Notification implements ShouldQueue
|
||||
{
|
||||
return (new MailMessage)
|
||||
->subject(trans('notifications.export.failed.title'))
|
||||
->line(new HtmlString('<br><br>'))
|
||||
->line(trans('notifications.export.failed.description'))
|
||||
->line($this->message);
|
||||
->line(new HtmlString('<br><br>'))
|
||||
->line($this->message)
|
||||
->line(new HtmlString('<br><br>'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -6,6 +6,7 @@ use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Support\HtmlString;
|
||||
|
||||
class ImportCompleted extends Notification implements ShouldQueue
|
||||
{
|
||||
@ -49,6 +50,7 @@ class ImportCompleted extends Notification implements ShouldQueue
|
||||
|
||||
return (new MailMessage)
|
||||
->subject(trans('notifications.import.completed.title'))
|
||||
->line(new HtmlString('<br><br>'))
|
||||
->line(trans('notifications.import.completed.description'))
|
||||
->action(trans_choice('general.dashboards', 1), $dashboard_url);
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Notifications\Notification;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
use Illuminate\Support\HtmlString;
|
||||
|
||||
class ImportFailed extends Notification implements ShouldQueue
|
||||
{
|
||||
@ -51,12 +52,16 @@ class ImportFailed extends Notification implements ShouldQueue
|
||||
{
|
||||
$message = (new MailMessage)
|
||||
->subject(trans('notifications.import.failed.title'))
|
||||
->line(new HtmlString('<br><br>'))
|
||||
->line(trans('notifications.import.failed.description'));
|
||||
|
||||
foreach ($this->errors as $error) {
|
||||
$message->line(new HtmlString('<br><br>'));
|
||||
$message->line($error);
|
||||
}
|
||||
|
||||
$message->line(new HtmlString('<br><br>'));
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
|
@ -55,11 +55,9 @@ class InvalidEmail extends Notification implements ShouldQueue
|
||||
|
||||
return (new MailMessage)
|
||||
->subject(trans('notifications.email.invalid.title', ['type' => $this->type]))
|
||||
->line(new HtmlString('<br>'))
|
||||
->line(new HtmlString('<br>'))
|
||||
->line(new HtmlString('<br><br>'))
|
||||
->line(trans('notifications.email.invalid.description', ['email' => $this->email]))
|
||||
->line(new HtmlString('<br>'))
|
||||
->line(new HtmlString('<br>'))
|
||||
->line(new HtmlString('<br><br>'))
|
||||
->line(new HtmlString('<i>' . $this->error . '</i>'))
|
||||
->action(trans_choice('general.dashboards', 1), $dashboard_url);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user