netflex/notifications

Netflex Notifications Mail Driver for Laravel

4.20.0 2022-11-24 19:35 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
    ])
);