laravel-eloquent-state-machines
laravel-eloquent-state-machines copied to clipboard
Added ability to use wildcard in allowed state changes
Summary
This will add functionality that allows the user to use wildcards when defining state changes. This can prove useful if you have a lot of states and you dont want to type them all in when everything is allowed. For example:
// If it should be possible to change from any state to a given state:
return [
'*' => [
'approved'
],
];
// If it should be possible to change to any state from the 'pending' state:
return [
'pending' => '*',
];
// If it should be possible to change to and from any state whatsoever:
return [
'*' => '*',
];
Type of Change
- [X] :rocket: New Feature
- [ ] :bug: Bug Fix
- [ ] :hammer: Refactor
- [ ] :question: [Other]