PHPackages                             it-devgroup/laravel-email-template-lite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. it-devgroup/laravel-email-template-lite

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

it-devgroup/laravel-email-template-lite
=======================================

laravel email template lite

2.0.0(2y ago)0358MITPHPPHP ^8.0

Since May 11Pushed 2y ago2 watchersCompare

[ Source](https://github.com/it-devgroup/laravel-email-template-lite)[ Packagist](https://packagist.org/packages/it-devgroup/laravel-email-template-lite)[ RSS](/packages/it-devgroup-laravel-email-template-lite/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelog (6)Dependencies (4)Versions (8)Used By (0)

Description
-----------

[](#description)

- command for sync email templates table in database
- all email templates in seeder file
- save and load email templates from database (API for CRUD system)
- custom variables (common and separate variables for each type of template)
- custom variables via config file
- text for custom variables via lexicon file
- wrapper template for all email templates (blade)
- preview email template
- customization email template model and table

Install for Lumen
-----------------

[](#install-for-lumen)

**1.** Open file `bootstrap/app.php`

Uncommented strings

```
$app->withFacades();
$app->withEloquent();

```

Added after **$app-&gt;configure('app');**

```
$app->configure('email_template_lite');

```

add new service provider

```
$app->register(\ItDevgroup\LaravelEmailTemplateLite\Providers\EmailTemplateServiceProvider::class);

```

**2.** Run commands

For creating config file

```
php artisan email:template:publish --tag=config

```

For creating migration file

```
php artisan email:template:publish --tag=migration

```

For generate table

```
php artisan migrate

```

For creating resource file

```
php artisan email:template:publish --tag=resource

```

Install for laravel
-------------------

[](#install-for-laravel)

**1.** Open file **config/app.php** and search

```
    'providers' => [
        ...
    ]

```

Add to section

```
        \ItDevgroup\LaravelEmailTemplateLite\Providers\EmailTemplateServiceProvider::class,

```

Example

```
    'providers' => [
        ...
        \ItDevgroup\LaravelEmailTemplateLite\Providers\EmailTemplateServiceProvider::class,
    ]

```

**2.** Run commands

For creating config file

```
php artisan vendor:publish --provider="ItDevgroup\LaravelEmailTemplateLite\Providers\EmailTemplateServiceProvider" --tag=config

```

For creating migration file

```
php artisan email:template:publish --tag=migration

```

For generate table

```
php artisan migrate

```

For creating resource file

```
php artisan vendor:publish --provider="ItDevgroup\LaravelEmailTemplateLite\Providers\EmailTemplateServiceProvider" --tag=resources

```

Next steps install for laravel and lumen
----------------------------------------

[](#next-steps-install-for-laravel-and-lumen)

**1.** Create seeder file if not exists for email templates. In the created seed file, you need to add a static method (for example, `public static function data()`). The method must return an array of standard to fill the database

**2.** Open config file `config/email_template_lite.php` and add this class and method in exists parameters

```
'data' => [
    'class' => \Database\Seeders\EmailTemplateTableSeeder::class,
    'method' => 'data',
],

```

**3.** Setup section **variable\_parser** for external or internal parser

Command for sync email templates
--------------------------------

[](#command-for-sync-email-templates)

```
php artisan email:template:sync

```

Custom model
------------

[](#custom-model)

###### Step 1

[](#step-1)

Create custom model for email template

Example:

File: **app/CustomFile.php**

Content:

```
