cube-agency/arbory-mail

Mail module for Arbory CMS

v1.0.1 2021-01-19 11:59 UTC

This package is auto-updated.

Last update: 2024-10-19 21:03:10 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);