I have a case where I have two different email providers for transactional emails (because one is unreliable). To know which provider I am using, I have a DB flag which controls which provider is to be used. I would also like to code to an interface so that I don't have to repeat too much code.
Is it possible in Laravel to use a Service Provider to check the provider setting in the DB before returning the binding for the emailing interface? If not, is it possible to bind an interface to an implementation in the controller?
Thanks!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire