MailChimp subscription

Installs: 8

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1


7.0.7 2020-07-10 18:19 UTC

This package is not auto-updated.

Last update: 2023-05-28 05:20:18 UTC


Build Status Latest Stable Version Total Downloads License

MailChimp API v2.0 Laravel PHP Example


  • Step1: Add this to your root composer.json
	"require": {
	    "jsdecena/mailchimp": "^7.0"

Or issue this command:

composer require jsdecena/mailchimp

  • Step2: Add this to your config/app.php in providers array
	'providers' => [
  • Step3: Run this in your terminal

php artisan vendor:publish --provider="Jsdecena\MailChimp\MailChimpServiceProvider"

  • Step4: Include the template anywhere in your template @include('mailchimp::mailchimp')

  • Step5: Set the variable in your .env file



  • Step6: Enjoy!

Overriding the template file?

  • Yes you can. Override the file in /resources/views/vendor/mailchimp/mailchimp.blade.php

What is new with 1.6?

  • Recently, I learned the power of doing TDD (test driven development) on applications using PHPUnit. So now, I am already throwing exception messages whenever there is an issue on the request!

What are the exception messages we are returning?

  • Email that MailChimp does not allow
    "error": "List_RoleEmailMember: is an invalid email address and cannot be imported."
  • Wrong API key provided
    "error":"Invalid MailChimp API key: 1112e36f7f44ef4cc3c5a584747abb05be"
  • Wrong List ID provided
    "error":"Invalid MailChimp List ID: accf6b0a0e111"

And if the subscription is successful, it will return the email, euid, leid on the data object

    "data": {