PHPackages                             addgod/laravel-mandrill-template - 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. addgod/laravel-mandrill-template

ActiveLibrary

addgod/laravel-mandrill-template
================================

Using Mandrill templates in Laravel.

v2.0.1(1y ago)427.4k↓20%6[2 issues](https://github.com/addgod/laravel-mandrill-template/issues)MITPHPPHP ^7.3|^8.0

Since Nov 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/addgod/laravel-mandrill-template)[ Packagist](https://packagist.org/packages/addgod/laravel-mandrill-template)[ RSS](/packages/addgod-laravel-mandrill-template/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (14)Used By (0)

Mandrill Templates for Laravel
==============================

[](#mandrill-templates-for-laravel)

A way to send mail via mandrills template system.

Installation
------------

[](#installation)

### Requirements

[](#requirements)

- PHP 7.2
- Laravel 6

You can install the package via composer:

```
composer require addgod/laravel-mandrill-template
```

To publish the config file run:

```
php artisan vendor:publish --provider="Addgod\MandrillTemplate\MandrillTemplateServiceProvider"
```

Usage
-----

[](#usage)

Add your mandrill secret key to your .env file.

```
MANDRILL_SECRET="YOUR SECRET KEY"
```

### Sending mail

[](#sending-mail)

```
use Addgod\MandrillTemplate\Mandrill\Message;
use Addgod\MandrillTemplate\Mandrill\Template;
use Addgod\MandrillTemplate\Mandrill\Recipient;
use Addgod\MandrillTemplate\Mandrill\Attachment;
use Addgod\MandrillTemplate\Mandrill\Recipient\Type;
use Addgod\MandrillTemplate\MandrillTemplateFacade;
```

```
$template = new Template('template-name');
$message = new Message();
$message
    ->setSubject('Subjct')
    ->setFromEmail('from@example.com')
    ->setFromName('Example Name')
    ->setMergeVars(['greeting' => 'Hello to you']);

$message->addRecipient(new Recipient('to@example.com', 'Example Name', Type::TO));
$message->addAttachment(Attachment::createFromFile($file, 'name_of_file');

MandrillTemplateFacade::send($template, $message);
```

### Via notifications

[](#via-notifications)

Create a new notification

```
php artisan make:notification WelcomeNotification
```

Set `via` to `MandrillTemplateChannel`:

```
use Addgod\MandrillTemplate\MandrillTemplateChannel;
```

```
/**
 * Get the notification's delivery channels.
 *
 * @param  mixed  $notifiable
 * @return array
 */
public function via($notifiable)
{
    return [MandrillTemplateChannel::class];
}
```

Implement `toMandrillTemplate` method and prepare your template:

```
use Addgod\MandrillTemplate\MandrillTemplateMessage;
```

```
public function toMandrillTemplate($notifiable)
{
    return (new MandrillTemplateMessage)
        ->template('notification')
        ->from('from@example.com', 'Example dot com')
        ->to('to@example.com', 'Frank Kornell') // This is an extra to, since the notifiable is also used.
        ->cc('cc@example.com', 'Charlott Kornell')
        ->bcc('bcc@example.com', 'Mr admin Dude')
        ->greeting('Hello there'),
        ->line('The introduction to the notification.')
        ->action('Notification Action', url('/'))
        ->line('Thank you for using our application!')
        ->salutation('Regards from us.')
        ->attach($file, 'name_of_file);
}
```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance21

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~138 days

Recently: every ~147 days

Total

13

Last Release

728d ago

Major Versions

v1.1.7 → v2.0.02023-01-17

PHP version history (2 changes)v1.0PHP &gt;=7.1.0

v1.1.5PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2fe57cce1f6232b48c1de83fd36af399e56d83d850a4672a2087fca5e6ab3fe4?d=identicon)[Addgod](/maintainers/Addgod)

---

Top Contributors

[![addgod](https://avatars.githubusercontent.com/u/9675235?v=4)](https://github.com/addgod "addgod (24 commits)")[![dzhy89](https://avatars.githubusercontent.com/u/14109628?v=4)](https://github.com/dzhy89 "dzhy89 (4 commits)")[![HevgerExternal](https://avatars.githubusercontent.com/u/99013965?v=4)](https://github.com/HevgerExternal "HevgerExternal (1 commits)")[![JesperFiltenborg](https://avatars.githubusercontent.com/u/69187219?v=4)](https://github.com/JesperFiltenborg "JesperFiltenborg (1 commits)")[![lakridserne](https://avatars.githubusercontent.com/u/419298?v=4)](https://github.com/lakridserne "lakridserne (1 commits)")[![lCHECHOl](https://avatars.githubusercontent.com/u/13172977?v=4)](https://github.com/lCHECHOl "lCHECHOl (1 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/addgod-laravel-mandrill-template/health.svg)

```
[![Health](https://phpackages.com/badges/addgod-laravel-mandrill-template/health.svg)](https://phpackages.com/packages/addgod-laravel-mandrill-template)
```

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[coreproc/nova-notification-feed

A Laravel Nova package that adds a notification feed in your Nova app.

10149.1k](/packages/coreproc-nova-notification-feed)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)[cybercog/laravel-nova-ban

A Laravel Nova banning functionality for your application.

40199.8k](/packages/cybercog-laravel-nova-ban)[insenseanalytics/nova-server-monitor

A Laravel Nova tool for Spatie's Server Monitor library.

6546.9k](/packages/insenseanalytics-nova-server-monitor)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11229.2k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

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