PHPackages                             sijanmahato/laravel-email-configuration - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. sijanmahato/laravel-email-configuration

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

sijanmahato/laravel-email-configuration
=======================================

Database-driven email templates with admin API, placeholder replacement, and test send.

v2.3.2(1mo ago)030MITPHPPHP ^8.1

Since May 15Pushed 1mo agoCompare

[ Source](https://github.com/sijanmahato/laravel-email-configuration)[ Packagist](https://packagist.org/packages/sijanmahato/laravel-email-configuration)[ Docs](https://github.com/sijanmahato/laravel-email-configuration)[ RSS](/packages/sijanmahato-laravel-email-configuration/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (14)Versions (14)Used By (0)

Laravel Email Config
====================

[](#laravel-email-config)

Database-backed email templates with JSON API for CRUD, `{{placeholder}}` replacement, and test sends.

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12
- `users` table (for `created_by` / `updated_by` foreign keys in the published migration)

Install
-------

[](#install)

Published on Packagist as **[sijanmahato/laravel-email-configuration](https://packagist.org/packages/sijanmahato/laravel-email-configuration)**.

### From Packagist (recommended)

[](#from-packagist-recommended)

```
composer require sijanmahato/laravel-email-configuration
```

Use `^1.0` (or another semver range) so Composer respects `minimum-stability: stable` when you ship tagged releases.

### From GitHub (VCS, optional)

[](#from-github-vcs-optional)

Use this if you need a branch that is not on Packagist yet, or you are testing a fork:

```
composer config repositories.sijanmahato-laravel-email-configuration vcs https://github.com/sijanmahato/laravel-email-configuration.git
composer require sijanmahato/laravel-email-configuration:dev-main
```

### Local path package (adjust the path)

[](#local-path-package-adjust-the-path)

Add to your app `composer.json`:

```
{
    "repositories": [
        {
            "type": "path",
            "url": "./packages/laravel-email-configuration",
            "options": { "symlink": true }
        }
    ],
    "require": {
        "sijanmahato/laravel-email-configuration": "*"
    }
}
```

Then run `composer update`.

### After the package is installed

[](#after-the-package-is-installed)

```
php artisan vendor:publish --tag=email-config-config
php artisan vendor:publish --tag=email-config-migrations
php artisan migrate
php artisan vendor:publish --tag=email-config-api
php artisan vendor:publish --tag=email-config-model
php artisan vendor:publish --tag=email-config-controller
```

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
-------------

[](#configuration)

Edit `config/email-config.php`:

- **`route_prefix`**: URL segment for the package routes. If your HTTP kernel already prefixes API routes with `api`, set this to `api/admin/email-configurations` (or whatever matches your app).
- **`middleware`**: Stack applied to all routes. Replace `auth:sanctum` with `auth:api` or add permission middleware as needed.

Auditing
--------

[](#auditing)

This package does not ship your application’s `Auditable` trait. Instead, the `EmailConfiguration` model dispatches:

- `Karja\EmailConfig\Events\EmailConfigurationCreated`
- `Karja\EmailConfig\Events\EmailConfigurationUpdated`
- `Karja\EmailConfig\Events\EmailConfigurationDeleted`

Subscribe in your `EventServiceProvider` (or `AppServiceProvider`) and forward them to your audit logger.

Custom user id for `created_by` / `updated_by`
----------------------------------------------

[](#custom-user-id-for-created_by--updated_by)

Bind your own resolver in a service provider:

```
use Illuminate\Support\ServiceProvider;
use Karja\EmailConfig\Contracts\UserIdResolver;

class AppServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->app->singleton(UserIdResolver::class, function () {
            return new class implements UserIdResolver {
                public function resolve(): ?int
                {
                    return auth()->id();
                }
            };
        });
    }
}
```

API
---

[](#api)

MethodPathActionGET`/{prefix}`List templatesGET`/{prefix}/{id}`Show onePOST`/{prefix}`CreatePUT`/{prefix}/{id}`UpdateDELETE`/{prefix}/{id}`DeletePOST`/{prefix}/{id}/test-send`Send test emailTest send JSON body: `{ "to": "user@example.com", "variables": { "user_name": "Jane" } }`.

Placeholders use `{{variable_name}}` in subject, HTML, and text bodies.

License
-------

[](#license)

MIT.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance90

Actively maintained with recent releases

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

13

Last Release

31d ago

Major Versions

v1.2.0 → v2.0.02026-05-25

### Community

Maintainers

![](https://www.gravatar.com/avatar/d3d7ecb07583f41391e3058e9ccbdbac407576e0f6c638d6f007c3b27aeaed10?d=identicon)[Sijan](/maintainers/Sijan)

---

Top Contributors

[![sijanmahato](https://avatars.githubusercontent.com/u/259779557?v=4)](https://github.com/sijanmahato "sijanmahato (13 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sijanmahato-laravel-email-configuration/health.svg)

```
[![Health](https://phpackages.com/badges/sijanmahato-laravel-email-configuration/health.svg)](https://phpackages.com/packages/sijanmahato-laravel-email-configuration)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M136](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M133](/packages/roots-acorn)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k21](/packages/fleetbase-core-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
