Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to use wildcard in allowed state changes #28

Merged

Conversation

jezzdk
Copy link
Contributor

@jezzdk jezzdk commented Dec 20, 2021

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

  • 🚀 New Feature
  • 🐛 Bug Fix
  • 🔨 Refactor
  • ❓ [Other]

@asantibanez
Copy link
Owner

Looks great @jezzdk 👍

@asantibanez asantibanez merged commit 5a8fdf7 into asantibanez:master Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants