-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
Description
I'm a new user of the SDK, but it looks like this snippet is the best way to determine if an email is currently subscribed or not:
$subscription = $this->mailerLite->subscribers()->find($user->email);
if (property_exists($subscription, 'error') && $subscription->error->code === 123) {
}This isn't very readable, and I was only able to obtain the 123 error code through trial & error as I didn't come across it in the documentation. It'd be great if there was a class constant representing this error code or if a shorthand helper method could be added such as if ($this->mailerLite->subscribers()->isSubscribed($email) that either returned a bool or threw an exception on error (e.g. 404).
electronick86