Domain-driven Laravel preset #1334
kylemilloy
started this conversation in
Ideas
Replies: 1 comment
-
Great idea, but there are so many different ways to structure your project with a DDD approach. It wouldn't make much sense to just support one structure, but as long as it is flexible and easy to adapt to your structure it would be a great feature. For example in most of my projects I use a structure similar to this:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It'd be a really nice feature if I could pass a domain to
arch()->preset()->laravel()
and have it add the exceptions for that domain instead of defaulting toApp/*
for everything. For example, my structure looks like:And if I had a usage where I could add an ArchTest.php to the base of all my test suites that had:
And this would then see the exceptions in Laravel marked as:
I can see that internally the abstract has a concept of namespaces (static::$baseNamespaces) but these are hard-coded in the Laravel preset to
App/*
and look to be unused. Willing to write a PR for this but not sure if the intent would be to use baseNamespace or just make this single preset more flexible.Beta Was this translation helpful? Give feedback.
All reactions