Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/recca0120/laravel-email-template
- Owner: recca0120
- License: mit
- Created: 2016-01-09T20:45:59.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-06T04:42:22.000Z (about 8 years ago)
- Last Synced: 2024-10-09T11:24:24.132Z (about 1 month ago)
- Language: PHP
- Homepage:
- Size: 16.6 KB
- Stars: 5
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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]');
});
```