This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This isn't quite the same as the production code, but I wanted to be clear in this demo! | |
class LoanApplication extends Model | |
{ | |
public function getNextStage() ?WorkflowStage | |
{ | |
$nextSequence = $this->workflow->sequences() | |
->where('sequence_number', $this->current_sequence_number + 1) |