/** * create construct method. * @return object */ private static function getCall() { try { $mailchimp = new MailchimpMarketing\ApiClient(); $mailchimp->setConfig([ 'apiKey' => env('MAILCHIMP_API_KEY'), 'server' => env('MAILCHIMP_SERVER') ]); } catch (Exception $e) { return array('error' => true, 'error_message' => $e->getMessage()); } return $mailchimp; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter