netflex/notifications

Netflex Notifications 邮件驱动程序,适用于 Laravel

v5.0.2 2023-10-04 08:21 UTC

This package is auto-updated.

Last update: 2024-09-16 16:09:20 UTC


README

Stable version Build status License: MIT Contributors Downloads

[只读] Netflex 通知组件的子树分割(见 netflex/framework

安装

composer require netflex/notifications

设置

config/mail.php

[
  'driver' => env('MAIL_DRIVER', 'netflex')
]

使用方法

您可以使用此驱动程序发送任何 Mailables。它还与 Laravel 的 通知 系统集成(并添加了一个 'sms' 通道,只需在您的通知中实现 toSMS 即可)。

<?php
use App\Mail\OrderConfirmed;

Mail::to($request->user())->send(new OrderConfirmed($order));

它还支持旧的 Netflex 邮件模板

<?php

use Netflex\Notifications\Notification;

Mail::to($request->user())->send(
    Notification::resolve('order_confirmed', [
        'firstname' => $order->customer_firstname
    ])
);