2017 © Pedro Peláez
 

package newsletter

MailChimp Subscribers Manager.

image

socieboy/newsletter

MailChimp Subscribers Manager.

  • Wednesday, July 29, 2015
  • by socieboy
  • Repository
  • 1 Watchers
  • 3 Stars
  • 34 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel Newsletter

Mailchimp manager., (*1)

Configuration

Add the service provider to the provider array on the app.php config file, (*2)

Socieboy\Newsletter\NewsletterServiceProvider

Execute the command to publish on the config folder the newsletter.php file, (*3)

php artisan vendor:publish
return [
    'lists' => [
        'test' => '123123123'
    ]
];

On the lists key set a name for each list id on mailchimp., (*4)

Don't forget to add to your .env file the mailchimp api key., (*5)

MAILCHIMP_APIKEY = 00000000000

Usage

Subscribe an email to lists.

On your controller or whatever place where you need to subscribe an email to a list on mailchimp., (*6)

<?php namespace App\Http\Controllers;

use Socieboy\Newsletter\Subscriber\SubscriberList as Subscriber;
use App\Http\Requests\Request;

class HomeController extends Controller {

    public function index(Request $request, Subscriber $subscriber)
    {
        $data = $request->only('email');

        $subscriber->subscribe('test', $data['email'])

        echo 'Done';
    }

}

Subscribe to mailchimp "test" list defined on the config file., (*7)


Fire campaings

<?php namespace App\Http\Controllers;

use Socieboy\Newsletter\Notifications\Notifier;
use App\Http\Requests\Request;

class HomeController extends Controller {

    public function store(Request $request, Notifier $notifier)
    {
        $data = $request->only(['subject', 'message');

        $notifier->notify($data['subject'], $data['message'], 'test')

        echo 'Done';
    }

}

The message can be a HTML content., (*8)

The Versions

29/07 2015

dev-master

9999999-dev

MailChimp Subscribers Manager.

  Sources   Download

MIT

The Requires

 

by Francisco Sepulveda