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

Can't easily extend drivers

Open acurrieclark opened this issue 8 months ago • 0 comments

I was looking for a simple way to extend the mailchimp driver, so created a new class with a few additional methods which inherits from the existing class. However, on changing the driver class in my config, I still found that the base class was being instantiated.

The current mailchimp driver uses new self in it's make method, which means that the base class is always instantiated for the facade.

Would new static make more sense here, so that it could be extended? I have just replaced the method in my own class for now, but it might make sense to future users?

Happy to submit a PR if this would be desirable. Thanks so much for the useful package(s)!

acurrieclark avatar Nov 07 '23 17:11 acurrieclark