mercredi 26 février 2020

Laravel how to use service globally without injection to all classes

The task is to create SmsService, which will be used everywhere. To use it inside any class, I have to inject it or create an instance. It works but I think there is a better solution. Does exist the mechanism to do it globally or maybe there are any other suggestions for this task?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire