Download the PHP package tomirons/tuxedo without Composer
On this page you can find all versions of the php package tomirons/tuxedo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tomirons/tuxedo
More information about tomirons/tuxedo
Files in tomirons/tuxedo
Package tuxedo
Short Description Simple transactional email classes/templates for Laravel 5.4 mailables
License MIT
Informations about the package tuxedo
Tuxedo
Tuxedo is an easy way to send transactional emails with Laravel's Mail
classes, with the templates already done for you.
Contents
- Installation
- Classes
- ActionMailable
- AlertMailable
- InvoiceMailable
- License
Installation
1) Run the following command:
`
2) Open your config/app.php
and add the following class to your providers
array:
``
3) (Optional) If you would like to edit the templates, run the following command to publish them
`
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
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
Methods
color($color)
- Sets the color of the button. Available options areblue
,green
, andred
.action($text, $url)
- Sets the button text and url.success()
- Sets the button color togreen
.error()
- Sets the button color tored
.info()
- Sets the button color toblue
.
Example
``
Screenshot
AlertMailable
Methods
info()
- Sets the type of the alert toinfo
.warning()
- Sets the type of the alert towarning
.success()
- Sets the type of the alert tosuccess
.error()
- Sets the type of the alert toerror
.type($type)
- Sets the type of alert, options areinfo
,success
,warning
, anderror
.message($message)
- Sets the message to display in the alert.
Example
``
Screenshot
InvoiceMailable
Properties
$keys|array
- Set which keys to use when looking for an item's name and price.
Methods
id($id)
- Sets the invoice ID.date($date)
- Sets the date to display at the top of the invoice table.due($date)
- Sets the due date of the invoice.items($items)
- Add an list of items to the invoice. Acceptable variable types areCollection
andarray
.calculate($taxPercent, $shipping)
- Calculates the tax and final total, MUST be called after items have been added.
Example
``
Screenshot
License
Tuxedo is open-sourced software licensed under the MIT license
All versions of tuxedo with dependencies
illuminate/database Version ^6.0|^7.0|^8.0
illuminate/mail Version ^6.0|^7.0|^8.0
illuminate/support Version ^6.0|^7.0|^8.0