hugofirth / laravel-mailchimp

A composer package for the MailChimp API PHP class (as provided by MailChimp) which supports the Laravel 4 framework.
96 stars 27 forks source link

Is there any method to change api key dynamically? #25

Open rycastaneda opened 10 years ago

rycastaneda commented 10 years ago

Something like MailChimpWrapper::setApiKey();

hugofirth commented 10 years ago

@rycastaneda No there isn't - could you not set it the same way you would any other config value however? http://laravel.com/docs/configuration

rycastaneda commented 10 years ago

I tried testing it but to no avail, it seems that its creating an instance based on the passed ApiKey. Changing the config value does not create a new instance.

fahrulazmi commented 9 years ago

hey @rycastaneda i did it by calling Config::set('mailchimp::apikey', $apikey); before calling any method.