Creating a listener
To create a listener, we use the “php artisan make:module:listener ModuleName listenerName” command.
php artisan make:module:listener blog BlogListener
This will create a listener in the path modules/blog/src/Listeners/BlogListener.php