Replies: 3 comments
-
Trying to debug, I found the following. For unknown reasons, the transitionTo() is executed twice when a custom transition class is defined.
ref: vendor/spatie/laravel-model-states/src/State.php |
Beta Was this translation helpful? Give feedback.
-
Same issue here, but it does work in a different project. Haven't figured out why yet. Tested on both versions 2.4.6 and 2.6.0. |
Beta Was this translation helpful? Give feedback.
-
I figured out what was the issue on my end. In the The example in the documentation is also returning the |
Beta Was this translation helpful? Give feedback.
-
Hi,
When using
$payment->state->transitionTo(Failed::class)
with a custom transition class defined in config(), I get the following error:However, nor $payment or $payment->state are null (checked with Ray)
No errors when using
$payment->state->transitionTo(Failed::class)
without having a custom transition in config().Any suggestion for debugging?
Thank you,
Beta Was this translation helpful? Give feedback.
All reactions