-
Notifications
You must be signed in to change notification settings - Fork 1
Creating e mail views
Murat Bastas edited this page Aug 12, 2017
·
2 revisions
This document will teach you how to create a view and extend from mail-template.
Firstly, create a mail view file like resources/emails/welcome.blade.php
And @extend from configured default template or a custom template.
@extends("mailtemplate::emails.{$template}")
// Or
@extends("mailtemplate::emails.custom")We can fill the blocks now.
** 1. Logo block **
@section('logo')
<img src="http://www.example.tld/images/logo.jpg" height="" width="">
@endsection** 2. Banner block **
Note: Some templates are needed direct url for background usage like campaign, some others are needed img and a tag. Look at the sample code for both usages.
@section('banner')
http://www.example.tld/images/image.jpg
@endsection
// Or
@section('banner')
<a href="http://www.example.tld" target="_blank">
<img src="http://www.example.tld/images/image.jpg">
</a>
@endsection** 3. Header block **
@section('header')
You have a new notification!
@endsection** 4. Content block **
@section('content')
<p class="paragraph">Hi, John Doe.</p>
<p class="paragraph">
Lorem ipsum dolor sit amet.
</p>
@endsection** 5. Footnote blok **
@section('footnote')
204 Brentwood Rd, Havertown, PA, 19083
@endsection