PHP code example of dotunj / lara-mailchimp

1. Go to this page and download the library: Download dotunj/lara-mailchimp library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

dotunj / lara-mailchimp example snippets




return [

  'providers' => [
        
        /*
         * Package Service Providers...
         */
         Dotunj\LaraMailChimp\LaraMailChimpServiceProvider::class,
         
   ]
]



return [
    'api_key' => env('MAILCHIMP_API_KEY'),
    'list_id' => env('MAILCHIMP_LIST_ID'),
];



use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Dotunj\LaraMailChimp\Events\UserRegistered;

class User extends Authenticatable
{
    use Notifiable;
    
    protected $dispatchesEvents = [
        'created' => UserRegistered::class
    ];
 
}
bash
php artisan vendor:publish --provider="Dotunj\LaraMailChimp\LaraMailChimpServiceProvider"