Closed akazorg closed 6 years ago
How about this?
Besides that, I will be adding some more options to the hooks view including buttons like:
The power of having the enable/disable option is for the developer to easily disable any hook when debugging some issue. I personally think it would be a nice idea to still have the the enable/disable option.
I was thinking about handling this by making a separate HookDataProvider which is almost like a service provider, but only with the options supported by the hook system. This HookDataProvider would include seeders, assets and migrations to run along with a rollback method to un-seed, un-migrate and un-publish assets.
HookDataProvider
will do the trick, that's awesome.
Please do it! I'm looking forward to test it!
Then, all hooks will implement that feature, and we have a solid Hook system!
Looks perfect.
This is a draft for revising the Hooks Setup Process, after a debate on this subject.
I'm not sure how to handle the Enable/Disable. The initial idea was to control this by loading (or not) the Hook Service Provider, but I think we need to load it in order to use routines enable/disable.
Maybe any of you wizards have an idea on this? Ping: @marktopper, @fletch3555, @tnylea
Setup Process
Install Hook 1.1 Download hook 1.2 Load Hook Service Provider 1.3 Run Migrations, Seeders and publish assets
Enable Hook ???
Disable Hook ???
Uninstall Hook 4.1 Prompt User for deleting data 4.2 Un-migrate and delete data
Thank you.