laravel-mailchimp icon indicating copy to clipboard operation
laravel-mailchimp copied to clipboard

Is there any method to change api key dynamically?

Open rycastaneda opened this issue 11 years ago • 3 comments

Something like MailChimpWrapper::setApiKey();

rycastaneda avatar Jul 24 '14 09:07 rycastaneda

@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

hugofirth avatar Jul 24 '14 13:07 hugofirth

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.

rycastaneda avatar Aug 26 '14 10:08 rycastaneda

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

fahrulazmi avatar Jan 19 '15 16:01 fahrulazmi