LaravelPackages.net
Acme Inc.
Toggle sidebar
alliance/laravel-email-template

improve email templates, allow to create and maintain them some what semi-dynamically

514
0
1.0.1
About alliance/laravel-email-template

alliance/laravel-email-template is a Laravel package for improve email templates, allow to create and maintain them some what semi-dynamically. It currently has 0 GitHub stars and 514 downloads on Packagist (latest version 1.0.1). Install it with composer require alliance/laravel-email-template. Discover more Laravel packages by alliance or browse all Laravel packages to compare alternatives.

Last updated

LaravelEmailTemplate

This is a laravel package that allows to configure email templates and update them through the admin panel

requirements: laravel 5.5 and above

Instructions

Step 1: Installation

Install the package using composer

composer require alliance/laravel-email-template

Step 2: Configuration

Go to your laravel resources folder and create a folder that will contain your email

cd resources/views
mkdir -p email-template/template1 email-template/template2

Publish package files. Run the following command

php artisan vendor:publish

Open the config file and add your configurations

vim app/config/laravelemailtemplate.php

Schedule your laravel app to run the extract command every minute

vim app/Console/Kernel.php

Inside the schedule() function. Add the following line.

$schedule->command('laravelemailtemplate:extract')->everyMinute()

For more details on scheduling. Check laravel documentation

Usage

Every email you want to allow the admin to update, you have to add it to the config file.

The config example:

return [
    // ... some configs
    templates => [
        [
            "name" => "template1", // template name
            "variables" => ["variable1", "variable2"], // available placeholders to be considered for the template
            "folder" => "email-template/template1", // path inside resources/views, NB: Each Template must have its own folder
            "entry_file" => "template.php" 
        ]
    ],
    // ... more configs
];

Star History Chart