We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
<?php namespace App\StateMachines; use Asantibanez\LaravelEloquentStateMachines\StateMachines\StateMachine; class OrderStateMachine extends StateMachine { public function recordHistory(): bool { return false; } public function transitions(): array { return [ '*' => ['enqueued', 'processing'], 'failed' => ['processing'], 'processing' => ['ready', 'failed'], ]; } public function defaultState(): string { return 'not_started'; } }
$model->orderState()->state(); // 'not_started' $model->orderState()->canBe('processing'); // false $model->orderState()->transitionTo('processing'); // true
Is that intentional/by design? if not, please let me know to do a pull request that makes canBe() respects the wilecards too.
canBe()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is that intentional/by design? if not, please let me know to do a pull request that makes
canBe()
respects the wilecards too.The text was updated successfully, but these errors were encountered: