netflex/notifications

Netflex Notifications Mail Driver for Laravel

v5.1.4 2024-09-30 09:27 UTC

This package is auto-updated.

Last update: 2024-10-29 08:32:18 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
    ])
);