Closed longestdrive closed 8 years ago
Hi
After a bit of fiddling I got this to work by doing the following:
change my code to:
$result = MC::request( 'lists' , [
'fields' => 'lists.id,lists.name,lists.stats.member_count' ,
'offset' => 0 ,
'count' => 10
] );
ddd($result);
This then gave a Mailchimp class not found
error. After a bit of fiddling I changed the serviceprovider to the following:
public function register()
{
$this->app->bind('Mailchimp', function ($app) {
$config = $app['config']['mailchimp'];
return new Mailchimp($config['apikey']);
});
}
And it now works - Is this correct though - by changing the namespace in the service provider will this break in further releases or is something wrong in my configuration?
Thanks
There is a bug in the MailchimpFacade.php - needs to return "Mailchimp\Mailchimp" rathern than just "Mailchimp"
I encountered the same problem.
Hi I'm having trouble initiating this package correctly in laravel 5.1. Probably a PICNIC error but need some help!
I've installed the package, added the service provider and facade per the docs. I've published the config file and added my apikey.
However trying the sample code for a simple request of lists I'm coming up with this error:
Here's my code:
If I try and initiate mailchimp direct I am able to get the list as expected but that appears to be bypassing the package and I'd rather use the facade and not have to worry about pulling the apikey etc.
This works:
What am I doing wrong? How can I use the facade correctly?
Thanks