2017 © Pedro Peláez
 

library madmimi

image

buchin/madmimi

  • Saturday, July 20, 2013
  • by buchin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 70 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 2 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Madmimi for Laravel 4

Madmimi is email, (*1)

Quick start

Required setup

In the require key of composer.json file add the following, (*2)

"buchin/madmimi": "dev-master"

Run the Composer update comand, (*3)

$ composer update

In your config/app.php add 'Buchin\Madmimi\MadmimiServiceProvider' to the end of the $providers array, (*4)

'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'Buchin\Madmimi\MadmimiServiceProvider',

),

At the end of config/app.php add 'Confide' => 'Zizaco\Confide\ConfideFacade' to the $aliases array, (*5)

'aliases' => array(

    'App'        => 'Illuminate\Support\Facades\App',
    'Artisan'    => 'Illuminate\Support\Facades\Artisan',
    ...
    'Madmimi'    => 'Buchin\Madmimi\Madmimi',

),

Example

Lets say you want to add confirmed user to list., (*6)

// routes.php or controller
Route::get('user/confirm/{code}', function($code){
    $user = User::where('confirmation_code', '=', $code)->firstOrFail();
    Event::fire('user.confirm', $user);

    //Confirm user here
});

// listener.php
Event::subscribe('user.confirm', function($user){
    mimi = new Madmimi('email@example.com', 'api_key');
    $user = array('email' => $user->email, 'firstName' => $user->firstname, 'add_list' => 'Test List');
    $status = $mimi->addUser($user);
});

The Versions

20/07 2013

dev-master

9999999-dev

  Sources   Download

The Requires

 

by Avatar buchin