Skip to content

Commit

Permalink
Merge pull request #61 from laravel-enso/new_email_notifications_temp…
Browse files Browse the repository at this point in the history
…late

New email notifications template
  • Loading branch information
gandesc committed May 7, 2018
2 parents bf7d157 + 3eac180 commit ff52fdc
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ public function boot()
__DIR__.'/app/Tabels' => app_path('Tables'),
], 'tables');

$this->publishes([
__DIR__.'/resources/views' => resource_path('views'),
], 'email-templates');

$this->publishes([
__DIR__.'/resources/views' => resource_path('views'),
], 'vuedatatable-email-templates');

$this->mergeConfigFrom(__DIR__.'/config/datatable.php', 'enso.datatable');
}

Expand Down
8 changes: 6 additions & 2 deletions src/app/Notifications/ExportDoneNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@ public function toMail($notifiable)
{
return (new MailMessage())
->subject(__('Export Notification'))
->line(__('You will find attached the requested report.'))
->line(__('Thank you for using our application!'))
->view('emails.exportDone', [
'lines' => [
__('You will find attached the requested report.'),
__('Thank you for using our application!'),
],
])
->attach($this->file);
}

Expand Down
15 changes: 15 additions & 0 deletions src/resources/views/emails/exportDone.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@extends('emails.layouts.main')

@section('content')
<table style="margin: 0 auto;" cellspacing="0" cellpadding="0" class="force-width-80">
<tr>
<td style="text-align:left; color: #6f6f6f;" class="spaced-out-lines">
@foreach($lines as $line)
<p>
{{$line}}
<p>
@endforeach
</td>
</tr>
</table>
@endsection

0 comments on commit ff52fdc

Please sign in to comment.