Skip to content

ALTELMA/laravel-mailchimp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JWT

Laravel MailChimp

Total Downloads

A packages provides you to connect mailchimp API v3

Setup

  • Run $ composer require altelma/laravel-mailchimp

  • (Only for Laravel 5.5 or minor) Add provider to config/app.php

providers => [
        Altelma\LaravelMailChimp\MailChimpServiceProvider::class  
],

Make sure you never use "MailChimp" or exists this in your project. After you finish config all run artisan to create config

php artisan vendor:publish

For optional if you want to use Alias class you can add this to config/app.php

aliases => [
      'MailChimp' => ALtelma\LaravelMailChimp\MailChimpFacade::class
]

Lumen

  • Add provider to bootstrap/app.php
$app->register(Altelma\LaravelMailChimp\MailChimpServiceProvider::class);

  • Copy vendor/altelma/laravel-mailchimp/config/mailchimp.php to config/mailchimp.php

  • Add config to bootstrap/app.php

$app->configure('mailchimp');
  • Allow call package via Facade, uncomment
$app->withFacades();

if (!class_exists('MailChimp')) {
    class_alias('Altelma\LaravelMailChimp\LaravelMailChimp', 'MailChimp');
}

Usage

$mc = new MailChimp('Your API KEY');
$results = $mc->get('lists/your_directory_list/members');
echo json_decode($results);

// or
return reponse()-json($results);

// With Alias
$results = MailChimp::get('lists/your_directory_list/members');
echo json_decode($results);

// or
return reponse()-json($results);

Bug report

This package is not perfect right, but it can improve together. If you've found bug or have any suggestions. Send that to me or create a new issue. Thank you to use it.

About

A packages provides you to connect mailchimp API v3

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages