vis / mail_templates_l5
L5的邮件模板
1.0.8
2017-04-07 09:22 UTC
This package is not auto-updated.
Last update: 2024-09-14 18:42:16 UTC
README
在composer.json中,在require块中添加
"vis/mail_templates_l5": "1.*"
执行
composer update
在app.php中,在providers数组中添加
Vis\MailTemplates\MailTemplatesServiceProvider::class
执行表格迁移
php artisan migrate --path=vendor/vis/mail_templates_l5/src/Migrations
发布js和配置文件
php artisan vendor:publish --tag=mail-templates --force
在config/builder/admin.php文件中,在menu数组中添加设置
array( 'title' => 'Почта', 'icon' => 'envelope-o', 'check' => function() { return true; }, 'submenu' => array( array( 'title' => "Шаблоны писем", 'link' => '/emails/letter_template', 'check' => function() { return true; } ), array( 'title' => "Письма", 'link' => '/emails/mailer', 'check' => function() { return true; } ), ) ),
从上面使用
use Vis\MailTemplates\MailT;
调用
$mail = new MailT("alias шаблона письма", array( "fio" => "Вася", "phone" => "097 000 00 00" )); $mail->to = "email"; $mail->attach = Input::file('file_name'); //если нужно много файлов переслать, то оформлять как массив : array(Input::file('file_name'), Input::file('file_name')) $mail->send();