laravel-eloquent-state-machines
laravel-eloquent-state-machines copied to clipboard
Supply the transition hooks with more data
Summary
Currently it's very difficult to pass data to transition hooks. I have this problem when I want to make a transition and the hooks depend on data that was sent in the request. Currently I have to save the request data on the model, even though it's not necessary to save it in the database. This change will allow more data to be sent to transition hooks.
Type of Change
- [X] :rocket: New Feature
- [ ] :bug: Bug Fix
- [ ] :hammer: Refactor
- [ ] :question: [Other]
I dont think this will ever gets merged since you are replacing the current database migration. Instead there should be a new migration for that.
Hello @jezzdk .
Let me take a look at this one. Don't like adding extra parameters to the transitionTo method. Let me see if there's another way.
Thanks @riyuk for keeping an eye on this one.