PHPackages                             dojo-sh/database-mail-templates - 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. [Database &amp; ORM](/categories/database)
4. /
5. dojo-sh/database-mail-templates

ActiveLibrary[Database &amp; ORM](/categories/database)

dojo-sh/database-mail-templates
===============================

Your Package Description here

0.0.1(4y ago)032MITBlade

Since Mar 22Pushed 4y ago2 watchersCompare

[ Source](https://github.com/dojo-sh/database-mail-templates)[ Packagist](https://packagist.org/packages/dojo-sh/database-mail-templates)[ RSS](/packages/dojo-sh-database-mail-templates/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

database-mail-templates
=======================

[](#database-mail-templates)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)![Travis](https://camo.githubusercontent.com/e17184caa460e92a033a966dd40687616f51bdf014b64e09ea1d4a63e5e431c7/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f646f6a6f2d73682f64617461626173652d6d61696c2d74656d706c617465732e7376673f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/d33821ef9b6fccab66b6fa854b9a8d3ef65fa2679eafedf1d47b398efff7461e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646f6a6f2d73682f64617461626173652d6d61696c2d74656d706c617465732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dojo-sh/database-mail-templates)

Render laravel mail using a blade template stored in the database

Install
-------

[](#install)

```
composer require dojo-sh/database-mail-templates
```

### Migrate

[](#migrate)

```
php artisan migrate

```

### Publish config

[](#publish-config)

```
php artisan vendor:publish --provider="DojoSh\DatabaseMailTemplates\DatabaseMailTemplatesServiceProvider" --tag=config

```

### Override default template

[](#override-default-template)

```
php artisan vendor:publish --provider="DojoSh\DatabaseMailTemplates\DatabaseMailTemplatesServiceProvider" --tag=views

```

Usage
-----

[](#usage)

### Create a new mailable

[](#create-a-new-mailable)

```
php artisan make:database-mail-template {name} {--notification}

```

Ex. Mailable Class

```
namespace App\Mail;

use DojoSh\DatabaseMailTemplates\TemplateMailable;
use Illuminate\Contracts\Queue\ShouldQueue;

class TestMail extends TemplateMailable
{
    public $templateVariable;

    public function __construct($templateVariable)
    {
        $this->templateVariable = $templateVariable;
    }
}

```

All public properties will be available in the template

### Mailable templates admin panel

[](#mailable-templates-admin-panel)

```
http://application.link/database-mail-templates

```

### Preview mail

[](#preview-mail)

```
class ContractApprovedMail extends TemplateMailable
{
    public $contract;

    public function __construct($contract)
    {
        $this->contract = $contract;
    }

    // Override this function and return mockup data to preview the mail
    public static function getPreviewInstance()
    {
        return new self(Contract::first());
    }
}

```

Testing
-------

[](#testing)

Run the tests with:

```
vendor/bin/phpunit
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](/LICENSE.md) for more information.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

1509d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/536ba1fb3077d9c77685285c5b0ec0f6357fd3877c6d081d8f8889c99275b362?d=identicon)[sidneyarida](/maintainers/sidneyarida)

---

Top Contributors

[![sidneyarida](https://avatars.githubusercontent.com/u/17513782?v=4)](https://github.com/sidneyarida "sidneyarida (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dojo-sh-database-mail-templates/health.svg)

```
[![Health](https://phpackages.com/badges/dojo-sh-database-mail-templates/health.svg)](https://phpackages.com/packages/dojo-sh-database-mail-templates)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M542](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M209](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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