Provide a ModelInterface and ModelTrait for Eloquent to support Hexagonal Architecture #39180
Unanswered
alexander-schranz
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In cases like hexagonal architecture you want to separate the infrastructure code from the domain logic. So you have example a:
And want to have a laravel integration for eloquent for it with:
Which adds eloquent methods to the model. The hardest thing which I did fail to implement such a thing was some static variables and how static variables behave differently between traits and abstract classes. Global config for all entities would need to be stored in a global class object and can not be in the trait as static variable.
Beta Was this translation helpful? Give feedback.
All reactions