定制 muratbsts/mail-template 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

muratbsts/mail-template

最新稳定版本:v0.0.1

Composer 安装命令:

composer require muratbsts/mail-template

包简介

This package is a easy to use mail template collection for Laravel 5.x.

README 文档

README

This package is a easy to use mail template collection for Laravel 5.x.

  • You can use it for every purpose.
  • You can override to all templates and all blocks.

🎨 Templates

There is only 3 templates available currently. But more templates is coming fastly. I'm developing beautiful and responsive email templates inspired by Really Good Emails Collection.

🏙 Screenshots are here

Installation

Add the package is to composer.json file:

composer require muratbsts/mail-template dev-master

Add the service provider to config/app.php file:

<?php
...
'providers' => [
    ...
    Muratbsts\MailTemplate\Providers\MailTemplateServiceProvider::class,
    ...
],
...

Create a config file like config/mailtemplate.php

<?php
return [
    'template'  => 'default',
    'footnote'  => null,

    'logo'      => [
        'path'  => null,
        'link'  => null,
    ],

    'from'      => 'sender@email.com',
    'cc'        => null,
    'bcc'       => null,
];

Usage

Use package as like below in your method

<?php

use Muratbsts\MailTemplate\MailTemplate as MailTemplate;

class XyzController extends Controller
{
    public function send()
    {
        $mailer = app()->make(MailTemplate::class);
    
        $mailer->send('emails.welcome', [
            'button' => [
                'text' => 'Sign up now!',
                'link' => 'https://google.com',
            ]
        ], function ($message) use ($user) {
            $message->to($user->email, $user->name)->subject('Welcome!');
        });
    }
}

Extend your welcome email template from mailtemplate::emails.{$template} as like below

@extends('mailtemplate::emails.{$template}')

@section('content')
    <p class="paragraph">Hi,</p>
    <p class="paragraph">Cultivar arabica, that, milk robust aroma redeye skinny arabica. Qui skinny, americano barista roast crema single shot filter. To go decaffeinated to go, mug iced sit plunger pot con panna decaffeinated barista sugar café au lait. Cup mazagran milk grinder, coffee steamed fair trade and whipped con panna aromatic.</p>
    <p class="paragraph">Take care,</p>
    <p class="paragraph">Murat</p>
@endsection

🎉 Cheers! That's it.

More details at the wiki page.

License

MIT © Murat Bastas

统计信息

  • 总下载量: 1.32k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 19
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 19
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-08-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固