This is a simple package for sending transactional (triggered) emails via the Spark Post REST Api.
Via Composer
$ composer require brant-wladichuk/sparkify
$user = \App\User::find(1);
$user->spark('template_id', [
'foo' => 'bar'
])
Add Service Provider to your app's config (config/app.php)
'providers' => [
...
BrantWladichuk\Sparkify\SparkifyServiceProvider::class
];
Publish the configuration file and update it as required
php artisan vendor:publish
Extend your user model with the Sparkable trait
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use BrantWladichuk\Sparkify\Sparkable;
class User extends Authenticatable
{
use Notifiable, Sparkable;
...
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING and CONDUCT for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.