Code Monkey home page Code Monkey logo

madmimi's Introduction

Madmimi for Laravel 4

Madmimi is email

Quick start

Required setup

In the require key of composer.json file add the following

"buchin/madmimi": "dev-master"

Run the Composer update comand

$ composer update

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

'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

'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.

// 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 protected]', 'api_key');
    $user = array('email' => $user->email, 'firstName' => $user->firstname, 'add_list' => 'Test List');
	$status = $mimi->addUser($user);
});

madmimi's People

Contributors

buchin avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

wow plenyun

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.