PHPackages                             tomirons/tuxedo - 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. tomirons/tuxedo

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

tomirons/tuxedo
===============

Simple transactional email classes/templates for Laravel 5.4 mailables

v2.0.0(5y ago)942.6k4MITPHPPHP ^7.3CI failing

Since Nov 14Pushed 5y ago2 watchersCompare

[ Source](https://github.com/tomirons/tuxedo)[ Packagist](https://packagist.org/packages/tomirons/tuxedo)[ RSS](/packages/tomirons-tuxedo/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (5)Versions (9)Used By (0)

Tuxedo
======

[](#tuxedo)

[![Version](https://camo.githubusercontent.com/2b368343a78f21ccc6d0d60e40ef790596ce635c151e00a1b76ac5fb992d9032/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f6d69726f6e732f74757865646f2e737667)](https://packagist.org/packages/tomirons/tuxedo)[![License](https://camo.githubusercontent.com/575c3a6045b935ea779fa586d64be6670646e5aa96b21716acd1ea12df06db95/68747470733a2f2f706f7365722e707567782e6f72672f746f6d69726f6e732f74757865646f2f6c6963656e73652e737667)](https://packagist.org/packages/tomirons/tuxedo)[![Total Downloads](https://camo.githubusercontent.com/22d6fb4aae391da7c96e8a9722ef56b2b0786dd7b959e99a3d817c21d15d169c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f6d69726f6e732f74757865646f2e737667)](https://packagist.org/packages/tomirons/tuxedo)[![Build Status](https://camo.githubusercontent.com/b3643d2cb26a598cdbfacf22000d9edba54703dc7517a1ad22c2d91cc464999f/68747470733a2f2f7472617669732d63692e6f72672f746f6d69726f6e732f74757865646f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/tomirons/tuxedo)

Tuxedo is an easy way to send transactional emails with Laravel's `Mail` classes, with the templates already done for you.

Contents
--------

[](#contents)

- [Installation](#installation)
- [Classes](#classes)
    - [ActionMailable](#actionmailable)
    - [AlertMailable](#alertmailable)
    - [InvoiceMailable](#invoicemailable)
- [License](#license)

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

[](#installation)

1. Run the following command:

```
$ composer require tomirons/tuxedo
```

2. Open your `config/app.php` and add the following class to your `providers` array:

```
TomIrons\Tuxedo\TuxedoServiceProvider::class
```

3. (Optional) If you would like to edit the templates, run the following command to publish them

```
php artisan vendor:publish --provider=TomIrons\Tuxedo\TuxedoServiceProvider
```

Classes
-------

[](#classes)

There are currently 3 different types of classes you can extend. `ActionMailable`, `AlertMailable`, and `InvoiceMailable`, and each have their own special properties and methods.

#### Global Methods

[](#global-methods)

These methods are available in **ALL** classes.

- `greeting($greeting)` - Sets the greeting for the message.
- `salutation($salutation)` - Sets the salutation for the message.
- `line($line)` - Add a line of text to the message.

### ActionMailable

[](#actionmailable)

#### Methods

[](#methods)

- `color($color)` - Sets the color of the button. Available options are `blue`, `green`, and `red`.
- `action($text, $url)` - Sets the button text and url.
- `success()` - Sets the button color to `green`.
- `error()` - Sets the button color to `red`.
- `info()` - Sets the button color to `blue`.

#### Example

[](#example)

```
