netflex/notifications

Netflex Notifications Mail Driver for Laravel

v4.44.0 2023-10-04 08:21 UTC

This package is auto-updated.

Last update: 2024-03-12 12:18:06 UTC


README

Stable version Build status License: MIT Contributors Downloads

[READ ONLY] Subtree split of the Netflex Notification component (see netflex/framework)

Installation

composer require netflex/notifications

Setup

In config/mail.php:

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

Usage

You can use this driver to send any Mailables. It also integrates with Laravels Notification system (and adds a 'sms' channel, just implement toSMS on your notification).

<?php
use App\Mail\OrderConfirmed;

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

It also supports the legacy Netflex mail templates:

<?php

use Netflex\Notifications\Notification;

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