cube-agency/arbory-mail

Mail module for Arbory CMS

v0.3 2018-09-08 06:06 UTC

This package is auto-updated.

Last update: 2020-07-15 18:18:37 UTC


README

Require cube-agency/arbory-mail

composer require cube-agency/arbory-mail

Publish config files and translations

php artisan vendor:publish --provider="CubeAgency\ArboryMail\Providers\MailServiceProvider"

Run migrations

php artisan migrate

Enable module by adding to config config/arbory.php and register routes in routes/admin.php

'menu' => [
    ...
    \CubeAgency\ArboryMail\Http\Controllers\Admin\MailTemplatesController::class
]
Admin::modules()->register(\CubeAgency\ArboryMail\Http\Controllers\Admin\MailTemplatesController::class);

Usage

Add new template to config/arbory-mail.php

'templates' => [
    \App\Mail\UserRegistered::class,
]

Generate required class

php artisan arbory-mail:generate

Send message

$message = new UserUpdated();
Mail::to('test@example.com')->send($message);