Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hasokeric's avatar

Looking for Open-Source Laravel DDD Example

I am looking for a open-sourced laravel Domain-Driven-Design example.

I have spent a numerous hours watching the Laravel videos and reading but there is still the "Which way do i do it now" question.

Jeffrey Ways Videos Show him doing (for example): App/Laracasts/Users/UserRepository.php App/Laracasts/Users/User.php App/Laracasts/Users/UserTraits.php

While others advocate: App/Laracasts/Entities/User.php App/Laracasts/Repositories/UserRepository.php App/Laracasts/Traits/UserTraits.php

I am sure for any new-comer not even to Laravel but DDD their head would spin - Jeffrey advocates skinny controllers in L4 videos and "hey dont listen to all this ddd stuff" in recent videos etc...

So i think a good solid example would be awesome.

0 likes
5 replies
martinbean's avatar

@hasokeric The thing with DDD, there is no one way to do it. It’s just a way to approach building software as opposed to it being a design pattern or whatever.

Pick up the book by Eric Evans. It’s a hefty book but it’s worth it if you’re working on very large applications. For smaller, simple apps DDD is overkill.

Piterden's avatar

Try the PyroCMS, it has CRUD code generators, which essentially represents something very similar to DDD. I'd say it is the NoDDD, actually))

The streams-platform uses the module namespace, which can be an analogue of a domain, and each stream is an analogue of a domain model there.

It has not only a value object (field in Pyro), but also a value object type (field_type).

It uses many of modern programming patterns for each model (stream), such as Observer, Repository, Collection, Criteria, Resolver and so on...

The Ubiquitous Language is fully achievable, even simpler and cheaper achievable than if you would use one of classic DDD arch schemes, IMHO.

1 like

Please or to participate in this conversation.