Open elfeffe opened 4 years ago
No, apps written with Concord are typically using the default Laravel Event system to achieve such functionality. Concord itself fires a couple of events and also supports apps/modules to disable events.
Nevertheless, you can use the mentioned package along with Concord without any problems.
Does this properly answer your question?
Sorry, but can you show me how to do that? Because the conventional approach is very criticized because “listeners but not return values”. What I need is to create some event getPaymentMethods and the plugins must return their methods. Do you have any example?
As an example, the Vanilo Payment module (which is built on top of Concord) is using the registry pattern to achieve such functionality: https://github.com/vanilophp/payment/blob/master/src/PaymentGateways.php#L22
And any plugin for the payment module can register itself with PaymentGateways::register(...)
Example plugin registering itself: https://github.com/artkonekt/vanilo-euplatesc/blob/master/src/Providers/ModuleServiceProvider.php#L26
Great, thanks a lot
@fulopattila122 I didn't see you are the developer, I have been following Vanilo for some time, from the first beta. When do you plan to release the payments ans shipping modules? I think I can use them in my project.
Does it supports Hooks? I have found this package https://github.com/tormjens/eventy But does your package offers that functionality?