Hi, I'm new to using Laravel Modules, and have tried Event-Driven (via Event-Listener) but there is a little problem, where when using the subscriber method, the listener doesn't listen to events and the event is not triggered, oh yes, coincidentally the storage for the queue uses a database, is it does that also matter?
<?php
namespace Modules\Merchant\Providers;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider
{
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
//
}
/**
* Get the services provided by the provider.
*
* @return array
*/
public function provides()
{
return [];
}
protected $subscribe = [
'\Modules\Merchant\Listeners\VerifiedAccountSubscriber'
];
}
I will consider this issue as closed, I answered my own question after finding the bugs in this library. You can check my answer in the following stackoverflow question here
Hi, I'm new to using Laravel Modules, and have tried Event-Driven (via Event-Listener) but there is a little problem, where when using the subscriber method, the listener doesn't listen to events and the event is not triggered, oh yes, coincidentally the storage for the queue uses a database, is it does that also matter?
VerifiedAccountSubscriber.php
Merchant Event Service Provider
MerchantServiceProvider.php