[WIP] Move Listener to Boot

This commit is contained in:
R
2022-12-29 09:56:03 +07:00
parent cb834d10bb
commit 0781e1ea00
3 changed files with 25 additions and 7 deletions

View File

@@ -2,17 +2,32 @@
namespace Modules\Internal\Providers;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\ServiceProvider;
use Modules\Internal\Events\ForgetPassword;
use Modules\Internal\Listeners\SendVerifyEmail;
class EventServiceProvider extends ServiceProvider
{
protected $listen = [
ForgetPassword::class => [
SendVerifyEmail::class,
],
];
// protected $listen = [
// ForgetPassword::class => [
// SendVerifyEmail::class,
// ],
// ];
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Event::listen(
ForgetPassword::class,
[SendVerifyEmail::class, 'handle']
);
}
/**
* Register the service provider.
*