Open Cepairda opened 3 years ago
Hi @Cepairda I'm using a command bus package: https://github.com/jildertmiedema/laravel-tactician
That means you can create a command and a command handler which is the service that handles the command. That a simple package that follows some conventions in order to map the command with its handler.
These are the 2 points where the command is dispatched:
As you can see the method is injected in the class with a trait:
given by that package.
You have the documentation about Tactician here: https://tactician.thephpleague.com/
Be aware that this is an old project I have not had time to maintain. I was importing appliances data from a site that does not exist anymore: https://www.appliancesdelivered.ie/ I should change the crawler part to get data from another web.
I did another example using SYmphony: https://github.com/josecelano/ddd-symfony-sample but it's also very old although the principles still apply. But they have a lot of deprecated packages and I haven't tested them for a long time.
If you are looking for samples about how to apply DDD with PHP this is a good starting point: https://github.com/dddinphp I got the basic ideas from their sample: https://github.com/dddinphp/last-wishes
I took a close look at the code. And I did not find the place where this section of the code is called. Where does the call take place?