vis / mail-templates
此包的最新版本(1.0.59)没有可用的许可证信息。
1.0.59
2016-05-04 09:02 UTC
Requires
- php: >=5.4.0
- illuminate/support: 4.2.*
README
在 composer.json 中,在 require 块中添加
"vis/mail-templates": "1.0.*"
执行
composer update
在 app.php 中添加
'Vis\MailTemplates\MailTemplatesServiceProvider',
执行表迁移
php artisan migrate --package=vis/mail-templates
发布 js 文件
php artisan asset:publish vis/mail-templates
在文件 app/config/packages/vis/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; } ), array( 'title' => "Настройки", 'link' => '/emails/settings', '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();