samedi 22 décembre 2018

Using Laravel contracts in Application/Domain layers

I'm building application at top of the Laravel. In my Domain layer I have services. One of these needs to send an EMail. Laravel has Illuminate\Mail package for these purposes.

But Mailer contract depends on \Illuminate\Mail\PendingMail class. https://github.com/laravel/framework/blob/5.7/src/Illuminate/Contracts/Mail/Mailer.php

Does it mean I need to write my own interface (port) for my Domain layer to fully decouple my application from framework?

Aucun commentaire:

Enregistrer un commentaire