@extends('layouts.admin.master') @section('title', !empty($emailTemplate) ? 'Edit Email Template' : 'Add Email Template') @section('content') @include('layouts.admin.flash.alert')

Manage Email Preference Here you can {{ !empty($emailTemplate) ? 'edit' : 'add' }} email preferences(layout)

{{ !empty($emailTemplate) ? 'Edit Email Template' : 'Add Email Template' }}

Back
@if(isset($emailTemplate)) {{ Form::model($emailTemplate, ['route' => ['admin.email-templates.update', $emailTemplate->id], 'method' => 'patch']) }} @else {{ Form::open(['route' => 'admin.email-templates.store']) }} @endif
{{ Form::select('email_hook_id', $hooks, null , ['class' => 'form-control', 'placeholder' => 'Select Email Hook']) }} @if($errors->has('email_hook_id')) {{ $errors->first('email_hook_id') }} @endif
{{ Form::text('subject', old('subject'), ['class' => 'form-control','placeholder' => 'Subject']) }} @if($errors->has('subject')) {{ $errors->first('title') }} @endif
{{ Form::textarea('description', old('description'), ['class' => 'form-control ckeditor','placeholder' => 'Description', 'rows' => 8]) }} @if($errors->has('description')) {{ $errors->first('description') }} @endif
{{ Form::textarea('footer_text', old('footer_text'), ['class' => 'form-control','placeholder' => 'Footer Text', 'rows' => 8]) }}
{{ Form::select('email_preference_id', $emailPreference, null , ['class' => 'form-control', 'placeholder' => 'Select Layout']) }} @if($errors->has('email_preference_id')) {{ $errors->first('email_preference_id') }} @endif
{{ Form::select('status', [1 => 'Active', 0 => 'Inactive'], old("status"), ['class' => 'form-control']) }}
{{ Form::close() }}

Important Rules

For each email hook that would be added to the sytem, make sure to follow these rules:

  • Use ##SYSTEM_APPLICATION_NAME## on the subject or message to print application name defined by admin settings.
  • Use ##USER_EMAIL## on the subject or message to print user email.
  • Use ##USER_NAME## on the subject or message to print user name.
  • Make sure the message contain ##MESSAGE##.
@if (!$emailTemplateLists->isEmpty())

Last updated templates

@endif
@endsection