Sparkify for Laravel
![Software License][ico-license]
![Quality Score][ico-code-quality]
, (*1)
This is a simple package for sending transactional (triggered) emails via the Spark Post REST Api., (*2)
Install
Via Composer, (*3)
``` bash
$ composer require brant-wladichuk/sparkify, (*4)
## Usage
``` php
$user = \App\User::find(1);
$user->spark('template_id', [
'foo' => 'bar'
])
Setup
Add Service Provider to your app's config (config/app.php), (*5)
``` php
'providers' => [, (*6)
...
BrantWladichuk\Sparkify\SparkifyServiceProvider::class
];, (*7)
Publish the configuration file and update it as required
``` bash
php artisan vendor:publish
Extend your user model with the Sparkable trait
``` php
<?php, (*8)
namespace App;, (*9)
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;, (*10)
use BrantWladichuk\Sparkify\Sparkable;, (*11)
class User extends Authenticatable
{
use Notifiable, Sparkable;, (*12)
...
```, (*13)
Change log
Please see CHANGELOG for more information on what has changed recently., (*14)
Contributing
Please see CONTRIBUTING and CONDUCT for details., (*15)
Security
If you discover any security related issues, please email brantwladichuk@gmail.com instead of using the issue tracker., (*16)
Credits
License
The MIT License (MIT). Please see License File for more information., (*17)