recca0120 / laravel-email-template by recca0120

email view from database
438
5
2
Package Data
Maintainer Username: recca0120
Maintainer Contact: recca0120@gmail.com (recca0120)
Package Create Date: 2016-01-09
Package Last Update: 2016-09-06
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-14 15:02:17
Package Statistics
Total Downloads: 438
Monthly Downloads: 1
Daily Downloads: 0
Total Stars: 5
Total Watchers: 2
Total Forks: 5
Total Open Issues: 0

Laravel Email Template

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

artisan migrate
\Recca0120\EmailTemplate\EmailTemplate::create([
    'slug' => 'my first template'
    'from_address' => 'admin@admin.com',
    '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('recca0120@gmail.com');
});