Search by

alfasix / alfakit-mail-templates

faizanakbar10

Editable email templates for AlfaKit panels: admins edit the subject and body of AlfaKit's, its plugins' and your mails per locale with merge tags, preview them with sample data, send a test to themselves, reset to the default and browse the history.

Package info

github.com/alfasixbh/alfakit-mail-templates

Homepage

Issues

pkg:composer/alfasix/alfakit-mail-templates

Statistics

Installs: 35

Dependents: 0

Suggesters: 0

Stars: 0

v0.2.5 2026-10-27 09:31 UTC

This package is auto-updated.

Last update: 2026-10-29 13:41:07 UTC


README

by Alfa Six

This is a read-only split of the AlfaKit monorepo. Please open issues and pull requests there.

Editable email templates for AlfaKit panels. Admins edit the subject and body of AlfaKit's, its plugins' and your own emails per language in the rich editor with merge tags, preview them with sample data in light and dark, send a test to themselves, reset to the default and restore earlier versions. It renders in React, Vue and Svelte with AlfaKit's built-in components.

Installation

composer require alfasix/alfakit-mail-templates
php artisan vendor:publish --tag=alfakit-mail-templates-migrations
php artisan vendor:publish --tag=alfakit-record-versions-migrations   # once, for the history
php artisan migrate

Register

use AlfaSix\AlfakitMailTemplates\MailTemplatesPlugin;

$panel->plugin(
    MailTemplatesPlugin::make()
        ->authorize(fn (User $user): bool => $user->is_admin)
        ->locales(['en', 'ar']),
);

Without authorize(), only users the manageAlfakitMailTemplates gate allows can open it.

Your own emails

Use the UsesEditableTemplate trait and register the email with MailDefinition::make('orders.shipped')->editable([...]). See the emails guide and the plugin docs.

License

MIT. See LICENSE.md.