Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 578 Bytes

README.md

File metadata and controls

22 lines (18 loc) · 578 Bytes

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');
});