Closed michellaurent closed 8 years ago
So it is should be working like the $connection with the Eloquent?
I think so
@michellaurent I hope this helps you
I think he was thinking about doing the following:
instead of
return [
'listId' => '',
'installationUrl' => '',
'apiKey' => '',
];
it could be like this
return [
'default' => [
'listId' => 'AAA',
'installationUrl' => 'aaa.com',
'apiKey' => 'AA123456',
],
'other' => [
'listId' => 'BBB',
'installationUrl' => 'bbb.com',
'apiKey' => 'BB234567',
],
];
However, I do not think that many of us have multiple installations, so the setListId() should be enough for now.
But @michellaurent you can also use setApiKey($apiKey) and setInstallationUrl($installationUrl) if you ever need to change it for that request only. :)
@hocza This is a good point, but I can't test this. I don't have 2 installations :-1:
@alisonmonteiro well I can access plenty, because I encourage my clients to use Sendy instead of mail chimp or other kind of expensive services. :)
However I only needed to connect with 1 Sendy / Laravel App so thats why it is left out. I think it is really rare if someone has multiple and wants to use multiple within 1 Laravel app :)
(By the way you can make multiple installations with subdomains with the same license)
But lets just close this for now. If someone really needs this in the future, it may be added
@hocza @alisonmonteiro I only have one Sendy install but I use two lists: a first one for members and second one for the newsletter. So when a user creates an account, I will add it to the member list. If someone wants to subscribe to the newsletter, I will add it on the other.
Instead of having to specify the list id, I think it would be nice to use a friendly name and have something like
Sendy::setList($list_name)->subscribe($data);
@michellaurent ok. Can you create a new issue for this feature?
It would be nice if we can have multiple
list_id
in the config file.installation_url
andapi_key
can be the same or different.vinkla/hashids
is a Laravel package that have this kind of features in his configuration. This package usegraham-campbell/manager
to enable different "connections".