Skip to content

Commit

Permalink
extract variable
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Nov 26, 2024
1 parent e872547 commit 04be74b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ModelStates/Transition.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ public function from(): State
/** Can be reused in default state transitions. */
final protected function manage(): void
{
$this->model->stateManager->setAttribute($this->model->stateManager::stateColumnName(), $this->to::name());
$this->model->stateManager->save();
$stateManager = $this->model->stateManager;
$stateManager->setAttribute($stateManager::stateColumnName(), $this->to::name());
$stateManager->save();
}
}

0 comments on commit 04be74b

Please sign in to comment.