laravel-modules
laravel-modules copied to clipboard
Add Event Handling and Constants for Module Actions
Hi,
In this pull request, I have added events for various actions and created a constant ModuleEvent to manage event names.
- New events added:
creating,created,deleting,deleted,used,unused - Existing events updated for usage:
boot,register,disabling,disabled,enabling,enabled
This pull request depends on #1879, as provider files are registered with a single file. It's important to add a listener to clear the manifest file after certain actions.
Thanks.
Hi,
In this pull request, I have added events for various actions and created a constant
ModuleEventto manage event names.
- New events added:
create,delete,used,unused
Nice feature, but why not use "creating" & "created" instead of "create" and "deleting" & "deleted" instead of "delete"?
Events are usually written in present continuous and past tense.
@dcblogdev
add new event creating, created, deleting, deleted and update tests.
Awesome, thank you!
@dcblogdev
Do you think it is necessary to change boot to booting, booted, and register to registering, registered?
These events may be used in projects, and changing them could cause problems.
Also, used and unused don't need to be split into two events. Do you agree?
I agree, lets not change those as you say others could be using them already.