Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/recca0120/laravel-email-template

email view from database
https://github.com/recca0120/laravel-email-template

Last synced: 24 days ago
JSON representation

email view from database

Awesome Lists containing this project

README

        

## Laravel Email Template

copy database/migrations/2016_01_10_023406_create_email_templates_table.php to [laravel base path]/database/migrations/

```
artisan migrate
```

```php
\Recca0120\EmailTemplate\EmailTemplate::create([
'slug' => 'my first template'
'from_address' => '[email protected]',
'from_name' => 'admin',
'content' => 'my name is: {{$name}}'
]);

$mailer = app()->make(\Recca0120\EmailTemplate\Mailer::class);
$slug = 'my first template';
$mailer->send($slug, ['name' => 'recca0120'], function($m) {
$m->to('[email protected]');
});
```