2017 © Pedro Peláez
 

library mailchimp

Mailchimp API wrapper, includes Laravel 5 support.

image

adgek/mailchimp

Mailchimp API wrapper, includes Laravel 5 support.

  • Thursday, November 10, 2016
  • by Adge
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 10 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Mailchimp

A wrapper and Laravel integration for Drew McLellan's Mailchimp v3, (*1)

Installation

  • composer require nztim/mailchimp
  • For Laravel 5 support:
    • Add the service provider to config/app.php: NZTim\Mailchimp\MailchimpServiceProvider::class,
    • Register the facade: 'Mailchimp' => NZTim\Mailchimp\MailchimpFacade::class,
    • Add .env value for MC_KEY (API key)

Usage

  • For Laravel 5, the Mailchimp facade or container instantiation is available, this requires the .env value for the API key
  • Mailchimp::check($listId, $emailAddress) checks to see if an email address is subscribed to a list, returns boolean
  • Mailchimp::subscribe($listId, $emailAddress, $mergeFields = [], $confirm = false) - adds a new subscriber to the list.
    • $mergeFields - optional array of merge fields
    • $confirm - optional boolean, true = send confirmation email, false = immediately subscribe (permission already obtained)
  • Errors
    • All methods return false for errors
    • Check Mailchimp::error() after a request to see if there was a problem.
    • Typical errors include networking/communications, incorrect API key, list doesn't exist
  • Gotchas: the API throws an error when you
    • Specify a merge field name with incorrect capitalisation
    • Omit a required merge field when adding a new member

The Versions

10/11 2016

dev-master

9999999-dev

Mailchimp API wrapper, includes Laravel 5 support.

  Sources   Download

MIT

The Development Requires

04/04 2016

v2.2

2.2.0.0

Mailchimp API wrapper, includes Laravel 5 support.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

26/01 2016

v2.1

2.1.0.0

Mailchimp API wrapper, includes Laravel 5 support.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

25/01 2016

v2.0

2.0.0.0

Mailchimp API wrapper, includes Laravel 5 support.

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

18/10 2015

v1.0

1.0.0.0

Mailchimp API wrapper, includes Laravel 5 support.

  Sources   Download

MIT

The Development Requires

24/06 2015

v0.1

0.1.0.0

Mailchimp API wrapper, includes Laravel 5 support.

  Sources   Download

MIT

The Requires

 

The Development Requires