Skip to content

Commit

Permalink
Merge pull request #256 from P3D-Legacy/fix-email-templates
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbilling authored Feb 4, 2023
2 parents 507be93 + 68da9b9 commit a7e7ade
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/Console/Commands/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ public function handle(): int
Artisan::call('nova:publish');
$this->info('Clear views...');
Artisan::call('view:clear');
$this->info('Sync schedule monitor...');
$this->call('schedule-monitor:sync');
$this->info('Done.');

return 0;
Expand Down
58 changes: 58 additions & 0 deletions resources/views/vendor/notifications/email.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<x-mail::message>
{{-- Greeting --}}
@if (! empty($greeting))
# {{ $greeting }}
@else
@if ($level === 'error')
# @lang('Whoops!')
@else
# @lang('Hello!')
@endif
@endif

{{-- Intro Lines --}}
@foreach ($introLines as $line)
{!! $line !!}

@endforeach

{{-- Action Button --}}
@isset($actionText)
<?php
$color = match ($level) {
'success', 'error' => $level,
default => 'primary',
};
?>
<x-mail::button :url="$actionUrl" :color="$color">
{{ $actionText }}
</x-mail::button>
@endisset

{{-- Outro Lines --}}
@foreach ($outroLines as $line)
{!! $line !!}

@endforeach

{{-- Salutation --}}
@if (! empty($salutation))
{{ $salutation }}
@else
@lang('Regards'),<br>
{{ config('app.name') }}
@endif

{{-- Subcopy --}}
@isset($actionText)
<x-slot:subcopy>
@lang(
"If you're having trouble clicking the \":actionText\" button, copy and paste the URL below\n".
'into your web browser:',
[
'actionText' => $actionText,
]
) <span class="break-all">[{{ $displayableActionUrl }}]({{ $actionUrl }})</span>
</x-slot:subcopy>
@endisset
</x-mail::message>

0 comments on commit a7e7ade

Please sign in to comment.