Download the PHP package sijanmahato/email-configuration without Composer
On this page you can find all versions of the php package sijanmahato/email-configuration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sijanmahato/email-configuration
More information about sijanmahato/email-configuration
Files in sijanmahato/email-configuration
Package email-configuration
Short Description Database-driven email templates with admin API, placeholder replacement, and test send.
License MIT
Homepage https://github.com/sijanmahato/email-configuration
Informations about the package email-configuration
Laravel Email Config
Database-backed email templates with JSON API for CRUD, {{placeholder}} replacement, and test sends.
Requirements
- PHP 8.1+
- Laravel 10, 11, or 12
userstable (forcreated_by/updated_byforeign keys in the published migration)
Install
Published on Packagist as sijanmahato/email-configuration.
From Packagist (recommended)
Use ^1.0 (or another semver range) so Composer respects minimum-stability: stable when you ship tagged releases.
From GitHub (VCS, optional)
Use this if you need a branch that is not on Packagist yet, or you are testing a fork:
Local path package (adjust the path)
Add to your app composer.json:
Then run composer update.
After the package is installed
The additional publish commands will copy the package's API route, model, and controller into your application for customization:
--tag=email-config-api→routes/email-config-api.php--tag=email-config-model→app/Models/EmailConfiguration.php--tag=email-config-controller→app/Http/Controllers/EmailConfigurationController.php
Configuration
Edit config/email-config.php:
route_prefix: URL segment for the package routes. If your HTTP kernel already prefixes API routes withapi, set this toapi/admin/email-configurations(or whatever matches your app).middleware: Stack applied to all routes. Replaceauth:sanctumwithauth:apior add permission middleware as needed.
Auditing
This package does not ship your application’s Auditable trait. Instead, the EmailConfiguration model dispatches:
Karja\EmailConfig\Events\EmailConfigurationCreatedKarja\EmailConfig\Events\EmailConfigurationUpdatedKarja\EmailConfig\Events\EmailConfigurationDeleted
Subscribe in your EventServiceProvider (or AppServiceProvider) and forward them to your audit logger.
Custom user id for created_by / updated_by
Bind your own resolver in a service provider:
API
| Method | Path | Action |
|---|---|---|
| GET | /{prefix} |
List templates |
| GET | /{prefix}/{id} |
Show one |
| POST | /{prefix} |
Create |
| PUT | /{prefix}/{id} |
Update |
| DELETE | /{prefix}/{id} |
Delete |
| POST | /{prefix}/{id}/test-send |
Send test email |
Test send JSON body: { "to": "[email protected]", "variables": { "user_name": "Jane" } }.
Placeholders use {{variable_name}} in subject, HTML, and text bodies.
License
MIT.
All versions of email-configuration with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/routing Version ^10.0|^11.0|^12.0
illuminate/mail Version ^10.0|^11.0|^12.0
illuminate/events Version ^10.0|^11.0|^12.0